American Venus Williams outlasted Jelena Ostapenko in a 7-5, 6-7 (3), 7-5 thriller Tuesday in the 2017 WTA Finals in Kallang, Singapore.
Williams, playing in the White Group in the round-robin event, needed three hours, 13 minutes to defeat Ostapenko, including 69 minutes in the third set.
It was the third-longest match in WTA finals history since match stats were first recorded in 2008.
It was 16 minutes shy of the record set in 2012 when Agnieska Radwanska beat Sara Errani in Istanbul.
Karolina Pliskova of the Czech Republic needed 62 minutes to complete a 6-2, 6-2 victory over Spain's Garbine Muguruza in the day's other match. The win allowed Pliskova to clinch a semifinal berth for the first time.
The fifth-seeded Williams, who is seeking her first title at the WTA finals in nine years, improved to 1-1 in the White Group. She lost in straight sets to third-seeded Pliskova on Sunday.
"It's not easy to lose the first match," Williams said. "Both of us are in the same situation and you have to fight. What else can you do except try to fight and live another day."
Ostapenko of Latvia is 0-2 in the round-robin. She lost to second-seeded Muguruza on Sunday.
Williams will face Muguruza and the seventh-seeded Ostapenko will oppose Pliskova in the last matches in the White Group on Thursday.
Williams missed a chance to get the win in straight sets by blowing a 2-0 lead in the second set. She also rallied from a 5-3 deficit in the opening set when Ostapenko misplayed her backhand shot.
"It was all credit to her," Williams said. "She just came up with a lot of shots, shots that you just can't prepare for."
Williams reached match point in the 10th game of the second set but her forehand sailed into the net. Williams then lost her first tiebreaker of the season when she was unable to handle Ostapenko's backhand.
In the third set, Ostapenko held a 5-4 lead by saving three break points but Williams secured the hard-fought victory with a backhand.
Williams converted 26 winners and made 29 unforced errors. Ostapenko recorded 48 winners but also made 40 unforced errors.
"Sometimes you need some luck. I don't know if there was any luck for me tonight," Williams said. "I just had to work for every point. Everyone's playing really well here and I'm just really lucky to get through tonight."
After Williams beat Ostapenko, Pliskova needed 62 minutes to complete the victory over Muguruza.
Pliskova completed the brisk match by converting a forehand winner after Muguruza saved three match points in the sixth game.
She beat Muguruza for the seventh time in nine meetings to clinch the top spot in the White Group.