(AP) WIMBLEDON, England - Roger Federer clinched the first singles medal of his career Friday in an Olympic marathon, winning 19-17 in the final set against Juan Martin del Potro.
The semifinal match lasted 4 hours, 26 minutes, and Federer rallied to win 3-6, 7-6 (5), 19-17. He converted only two of 13 break-point chances, the second coming in the next-to-last game.
With the comeback victory, four-time Olympian Federer is assured of at least a silver. On Sunday he'll play in the final against the winner of the second semifinal between No. 2-seeded Novak Djokovic of Serbia and No. 3 Andy Murray of Britain.
Del Potro will play for the bronze.
In 2008, Federer and Swiss teammate Stanislas Wawrinka won the gold in doubles. But Federer had been 0 for 3 in Olympic singles, the biggest hole in a resume that includes a record 17 Grand Slam titles.
First-time Olympian Maria Sharapova advanced to the women's final by beating Russian teammate Maria Kirilenko 6-2, 6-3. Sharapova's opponent Saturday will be Serena Williams or No. 1-seeded Victoria Azarenka.
For length, Federer's victory didn't rival John Isner's 70-68 final-set win at Wimbledon in 2010, or even Jo-Wilfried Tsonga's 25-23 win in the third set at the Olympics this week.
But the match offered epic drama magnified by the setting and the stakes for Federer. He improved to 12-0 this summer at the All England Club, including a record-tying seventh Wimbledon title a month ago.
There were no match points until the final game, and after a couple of nervous moments for Federer, he sealed the victory when Del Potro dumped a backhand in the net. Federer lifted his arms in jubilation, then leaned wearily on the net awaiting the Argentine's handshake. They then shared a warm embrace.
Del Potro had the edge for most of the first two sets, reaching the net more often and winning the majority of the baseline rallies, starting with a 23-shot exchange in the opening game. The 6-foot-6 Del Potro showed little apparent effort as he snapped explosive forehands that had Federer scrambling and lunging.
"Not enough, Rah-jah!" a British spectator shouted when Federer fell behind.
The near-capacity crowd on sunny Centre Court was clearly in Federer's corner. Fans clapped and chanted "Ro-ger!" during a changeover, and later "Let's go, Roger!" More than once a Swiss cowbell clanged.
Small clusters of Argentine fans broke into song, and the match like the entire tournament took on an atmosphere more festive than during Wimbledon.
Federer's comeback came slowly. He was on the verge of digging a deeper hole midway through the second set, when he faced a break point and needed 16 points to hold for a 3-2 lead. He played another patchy game at 4-all, when he misplayed an overhead, blew an easy volley, squandered a 40-love lead and faced another break point.
He managed to hold, and never trailed in the tiebreaker. Then the match proceeded on even terms for the next couple of hours.
In the 15th game of the final set, Del Potro twice won rallies after clipping the net cord with shots, the second time to erase a break point. Federer's bad luck had him screaming in frustration.
But for the most part, he managed to keep any annoyance in check. In the 31st game of the final set, when he mishit back-to-back forehands the second sailed long he gave his wife a wry grin.
Federer broke for the first time in the 19th game of the final set when Del Potro double-faulted twice. That gave him a chance to serve for the victory at 10-9, but he was broken at love.
He waited 16 games for another chance, while repeatedly holding easily to stay in the match. Del Potro made three unforced errors in the 35th game to lose serve for only the second time, and eight points later the marathon reached the finish line.