Zhuhai - Former world number one Garbine Muguruza battled past second seed Anastasija Sevastova to clinch a place in the semi-finals of the WTA Elite Trophy in China on Friday.
The two-time grand slam winner from Spain won her final round-robin match - effectively a playoff for a semi-final spot - 6-7, 6-2, 7-6.
Sevastova, 22 from Lativa, took a nip-and-tuck first set in Zhuhai after a tie-break, but Muguruza, also 22, comfortably won the second.
The decider was a thriller for the fans at the Hengqin International Tennis Centre, who witnessed some nail-biting tennis as the players fought toe-to-toe.
But world number 17 Muguruza took control in the final tie-break, producing some fantastic shots to win it 7-1 after over two hours and 45 minutes on court.
She joins Australia's Ashleigh Bartee and Germany's Julia Georges in Saturday's semi-finals.
Madison Keys, Daria Kasatkina and Wang Qiang could all still qualify from the last group. Keys will go through if she beats China's Wang in straight sets later on Friday.
Earlier France's number one Caroline Garcia missed out on a semi-final spot despite beating Aryna Sabalenka in straight sets.
The 22-year-old won 6-4, 6-4 but because she lost more than seven games to the Belarusian, Barty scraped through the round-robin group following her win over Garcia on Thursday.
A straight-sets win, or even a loss in three sets, would have been enough for 20-year-old Sabalenka, but the tournament's youngest player joins Garcia in being eliminated from the tournament.
"I don't know how to describe it," Garcia told reporters.
"After yesterday's match I wanted to win today, but I was not really thinking about qualifying for the semi-final."
Barty's 6-3, 6-4 win over Garcia means the French star ended up bottom of the group of three.
"I'm happy with the win," she said. "I was solid; it was much better than yesterday. It's still a win but it's a disappointment to finish third."
The crowd witnessed a tense encounter between third seed Sabalenka and eighth seed Garcia, with both players showing signs of frustration at times.
Garcia needed to hold her nerve to take the first set. Serving at 5-4 up, she faced three break points at 0-40 down, but managed to claw back to clinch the set.
She continued that momentum into the second set, immediately breaking Sabalenka's first service game, and it felt like the world number 18 could qualify for the semi-finals.
However, that chance was snatched away as Sabalenka crucially won a service game to make it 5-4, although Garcia sealed the match in the following game.
The Elite Trophy features 12 players ranked roughly from nine to 20. This year's total prize money is $2.35 million across the singles and doubles tournaments.