Argentina's Juan Martin del Potro ended Rafael Nadal's hopes of a second Olympic singles title Saturday with an epic 5-7, 6-4, 7-6, (7/5) win to set up a gold medal showdown with defending champion Andy Murray.
The world number 141 Del Potro, whose career was almost ended by a series of wrist operations, triumphed after three hours and eight minutes of compelling centre court action.
Second seed Murray reached his second successive Olympic final with a ruthless 6-1, 6-4 demolition of Japan's Kei Nishikori.
Nadal, the 2008 singles champion, had won the men's doubles on Friday with Marc Lopez but playing his 10th match of the Rio tournament finally caught up with him.
Rafael Nadal (ESP) of Spain in action against Juan Martin Del Potro (ARG) of Argentina. (Reuters)
Murray can become the first player to defend an Olympic singles gold but he must get past a rejuvenated 2009 US Open champion Del Potro, who shocked world number one Novak Djokovic in the first round.
"It means a lot to me. It's very big, maybe even more special than when I won the US Open," said 27-year-old del Potro who was mobbed by Argentine fans at the end of the semi-final.
"I didn't expect to get to the final; I didn't expect to beat Djokovic. It's just amazing for me."
In a rollercoaster of a semi-final, Nadal saved eight break points in the final set before del Potro raced through the tiebreaker.
Nadal saved a match point but his fate was sealed when he ballooned a forehand wide of the court.
"I tried my best. It was a great match, full of emotion and played to a high level," said Nadal who was playing his first tournament since May when a wrist injury forced an early withdrawal from the French Open.
"I am satisfied. I did my best. I fought and with great spirit. After two and a half months without playing, I was able to compete against some of the best players in the world."
Del Potro went into the semi-final trailing Nadal 8-4 in career meetings. He had not beaten the Spaniard on a hard court for five years.
But he struck first with a break of Nadal's opening service game.
Nadal, who missed his Olympic title defence through injury in 2012, levelled at 4-4 before carving out the key break in the 12th game to grab the set.
Del Potro, a bronze medallist in 2012, refused to yield and claimed the only break of the second set with a trademark monster down-the-line forehand in the third game.
The 1.98m (6ft 6ins) Argentine survived a break point in a 10-minute second game of the decider which set the tone for the dramatic conclusion.
Meanwhile, Murray insisted he's ready to conquer the challenge of becoming the first player to win back-to-back Olympic golds.
"It would mean a lot to me. It's not easy, that's why it's never been done before, but I will go out there and give it my best," said the 29-year-old world number two.
"I am guaranteed a medal already but the goal is to win gold and I'll do all I can to do it."
Saturday's victory allowed Murray to extend his mastery over Nishikori to 7-1 and stretch his current winning streak to a career-best 17 matches.
Nishikori, 26, had to save three match points to beat Gael Monfils in the quarter-finals and the effort took its toll on Saturday when he was broken in the fourth and sixth games of the first set.
The Japanese star won just five points off the Murray serve in the opener and seven in the second when he was broken again in the sixth game.
He managed to save two match points but dumped the third into the net with a weary backhand and the contest was over in 80 minutes.
Murray didn't face a single break point in the match.
Nishikori and Nadal will meet for the bronze medal on Sunday.