Serena Williams regained her composure after smashing her racket and being on the brink of defeat to beat Caroline Wozniacki 2-6, 6-3, 7-6 on Saturday and set up a rematch with Simona Halep in the WTA Finals title decider in Singapore.

The best of friends off the court, the pair slugged it out like prizefighters for over two hours until Williams delivered the blow to end a contest filled with drama and escalating tension.

The world No1 looked to be on the ropes after losing the first set and smashing her racket in frustration, then falling 5-4 behind in the third set. But Wozniacki, who lost to Williams in last month’s US Open final, failed to serve out the match and the American made her pay by winning the crucial tie-breaker.

“Caroline played a great match, it was really difficult today,” Williams said. “I feel so bad. She’s the only one undefeated [after the group stages] in this tournament and she deserved to win.”

Wozniacki made a flying start to the match, reeling off the first three games for the loss of just three points. Williams was unable to make any early inroads on Wozniacki’s serve and her frustrations boiled over after she fell 5-2 behind.

Williams slammed her racket to the ground three times, incurring a warning from umpire Kader Nouni. Wozniacki immediately broke a distracted Williams again to wrap up the opening set 6-2 in just 25 minutes.

Williams raised her game for the second set, putting Wozniacki under immediate pressure. She broke the Dane’s serve for the first time with a ferocious return that Wozniacki chipped back then broke her again to level the match at one set apiece when Wozniacki double-faulted.

The third set lasted longer than the first two combined as both players ran themselves close to exhaustion. Wozniacki, in training for next month’s New York marathon, appeared to have the edge in fitness when she broke Williams in the ninth game but was unable to serve out the match.

Wozniacki saved a match point in her last service game to force the tie-breaker, then two more after Williams had reeled off five points in a row. But the American set up a fourth match point with her 12th ace of the match, then sealed the victory when Wozniacki hit a forehand wide.

Simona Halep crushed Agnieszka Radwanska 6-2, 6-2 to join Williams in the final. Halep broke Radwanska’s serve five times and racked up 26 winners against the Pole, including an overhead smash to seal victory in just over an hour.

“I’m very excited to be in the final,” Halep said. “I’ve played my best tennis here this week.”

The 23-year-old Halep, recently named the most improved player on the tour by the WTA, has reached the final in her first appearance at the elite season-ending event.

Earlier this week, the Romanian demolished Williams 6-0, 6-2 in the round-robin stage, handing the world No1 her heaviest defeat in 16 years – but Williams said she was looking forward to the rematch.

“I’m excited. My goal is to win three games. That’ll be my first goal,” she said. “Hopefully I can hold serve. That would be good. Most of all, I hope to break once. So I’m starting out with low goals. She played really well. I’m just going to do the best I can do and see what happens.”