Argentina’s Juan Martin del Potro ended Rafael Nadal’s hopes of a second Olympic singles title on 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.

WATCH: golden moments on Day 7 at the Rio Olympics

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.

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.