World No 1 Serena Williams edged an enthralling battle with third-seed Simona Halep 6-2, 4-6, 7-5 to set up a Miami Open final showdown against Spain's Carla Suarez Navarro, who advanced in straight sets earlier on Thursday.
After the first set and with Williams in top form, it looked to be a straightforward night at Key Biscayne for the seven-time Miami champion but the contest turned into an 128-minute slugfest as Halep simply refused to fold.
The Romanian raised her game in the second set and handled Williams' serve superbly as both players held until the 23-year-old from Constanta broke for a 5-4 lead before serving out to force a deciding set.
Again Williams looked to have finished Halep off when she broke in the second game and raced out to a 3-0 lead but the Romanian dug deep once more to extend the contest.
With the surprisingly large contingent of Romanian fans roaring her on, Halep broke back and then held to level at 5-5.
Halep was the last player to beat Williams on the WTA Tour and another upset appeared on the cards but the top-seed held and then broke to love to finish off the match.
Earlier, Suarez Navarro completed a clinical 6-3, 6-3 victory over German ninth seed Andrea Petkovic to reach her maiden final in a premier-level event and will make her top-10 debut on Monday when the world rankings are released.
Navarro will be the first Spanish woman to reach the top 10 since Arantxa Sanchez-Vicario in 2001.
The 12th seed delivered a masterclass on a sun-kissed stadium court, surrendering just 12 points on her serve the entire match while never facing a break point.
Petkovic, through to the last four in Miami for the second consecutive year, was broken twice in the opener en route to dropping her first set in this year's competition.
Navarro, who pulled out of a final against Petkovic in Antwerp earlier this year due to a neck injury, grabbed the decisive break in the sixth game of the second set when the German drove a forehand into the net to fall 4-2 behind.
The Spaniard then held serve to close out the contest in 87 minutes.
"I tried to fight myself into the match but there were just so many unforced errors from my side," Petkovic told reporters. "You're not going to win a match at that level at that stage of a tournament with so many unforced errors."
I don't see any Indian athlete winning an Olympic medal at Rio: Milkha
Have you been discriminated against?
Find out why Swiss study names Messi No 1, Ronaldo 29th
De Villiers 1st on MVP standings. Guess who's 5th?
It's official! Saina Nehwal is World No 1!