France's Gilles Simon beat world number one Rafael Nadal in a thrilling tussle at the Madrid Masters on Saturday to set up a final showdown with Andy Murray.
British fourth seed Andy Murray had earlier dashed hopes of a final meeting between the world's top two players when he outgunned second seed Roger Federer 3-6, 6-3, 7-5.
Simon took almost 3-1/2 hours, saving 17 break points along the way, to record a nailbiting 3-6, 7-5, 7-6 win over Nadal.
There was drama even in the final point as the players and 10,000 spectators held their collective breath for Hawkeye to confirm that Nadal's final forehand had dropped just long.
"I wanted to give 100 percent of myself. I want to fight on every point. I'm playing tennis for this kind of match," said Simon, who had also beaten Federer earlier this year. "Its one of the greatest victories of my career."
Although Nadal won the first set comfortably, the 16th-ranked Simon refused to get overawed by the Mallorcan's brutish groundstrokes. The two slugged it out in one high-class rally after another and the Frenchman eventually prevailed to level the contest.
Nadal broke in the final set but Simon immediately wiped out the advantage and stole the Spaniard's serve again.
When Simon attempted to serve out for victory, Nadal hit back to win that game. However, the French Open and Wimbledon champion was out-fought in the deciding tiebreak.
Simon said the match changed after he won a marathon second game in the deciding set that went to nine deuces.
"He had so many chances to break me in the game and the stress just disappeared. I just wanted to enjoy the party," said the 23-year-old. "I wanted to have a great fight with him and that's what I managed to do."
While Simon's run in Madrid means he will leapfrog Richard Gasquet to become the top French player when the new ATP rankings are released on Monday, Nadal was guaranteed the year-end number one spot after Federer failed to reach the final.
After losing to Federer in the US Open showpiece last month, Murray gained sweet revenge by outwitting Federer.
The Scot said on Friday he felt more relaxed than before his straight-sets defeat at Flushing Meadows, and early deliveries of around 220 kph hinted at a closer contest in Madrid.
Former world number one Federer won the first set with some attacking tennis but Murray grew in confidence with his serve purring nicely and by the third set the 21-year-old had taken control.
"I'm obviously playing great tennis, yesterday I played great but with all respect to (Frenchman Gael) Monfils, he's not the same player as Federer," said the fourth seed.
Murray and Simon become the first players since 1993 to beat two different number ones -- Federer and Nadal -- in one season.
Murray slammed 14 aces, 10 in the final set, but it was testament to Federer's fearless style that the Swiss saved six break points before finally cracking at 5-5.
The Scot brought up match point with a huge cross-court winner and sealed his third victory over Federer when his opponent dumped the ball into the net.
"I thought Andy served very well today and returned much more comfortably than at the (U.S.) Open," said Federer. "He did well to hang in there and it was a close match."