London: Roger Federer fought through the longest three-set singles match in the Open era Friday when he beat Argentina's Juan Martin del Potro 3-6, 7-6 (7/5), 19-17 to reach the Olympic final.
Wimbledon champion Federer was on the brink of a shock defeat on Centre Court after dropping the first set, but the world number one finally subdued del Potro after a marathon four hours and 26 minutes.
The match, 23 minutes longer than Rafael Nadal and Novak Djokovic's Madrid semi-final in 2009, comes after Jo-Wilfried Tsonga took 66 games to beat Milos Raonic in the second round -- the most seen in an Olympic three-setter.
The great escape means Federer, 30, is guaranteed at least a silver medal. In Sunday's final, he will face world number two Novak Djokovic or Britain's Andy Murray, who was beaten by Federer in last month's Wimbledon final.
After a relatively barren two years by his standards, Federer is suddenly enjoying another of his dominant periods and this hard-fought victory showed his hunger for success remains as strong as ever.
Less than a month ago, Federer, a doubles gold-medallist with Stanislas Wawrinka in Beijing four years ago, was crowned Wimbledon champion for a record-equalling seventh time.
Now he is just one win away from completing the 'golden slam' of titles in all four majors and the Olympic singles gold.
Del Potro's 2009 US Open final win over Federer was one of just two victories in 14 meetings with the Swiss, who came from two sets down to beat the 23-year-old in this year's French Open quarter-finals.
But the big Argentine came out fighting, unleashing some hefty serves and punishing groundstrokes to keep Federer from establishing control.
After saving a break point in the third game, del Potro made Federer look increasingly uncomfortable and he secured the opening break for a decisive 5-3 lead when the Swiss was rushed into netting a backhand.
Federer was having to scramble just to hold his serve and he produced a pair of crucial aces to save two break points at 4-4 in the second set.
It needed a tie-break to decide the set and Federer finally began to dictate the tempo. He raced into a 4-1 lead and kept his nerve to induce a series of mistakes from del Potro that levelled the match.
A nerve-wracking final set saw five break chances wasted, two for del Potro and three for Federer, before the Swiss had a chance to serve for the match after breaking at 9-9.
Yet even then he couldn't finish off del Potro, as incredibly the Argentine broke to love.
The drama continued as Federer squandered three more break points at 14-14 before he finally delivered the knockout blow with a break to lead 18-17.
Federer's supreme fitness had kept him going and he wasn't going to waste this chance, at last ending an all-time classic when del Potro netted on the second match point.