Updated

Wimbledon champion Roger Federer outlasted former U.S. Open titlist Juan Martin del Potro in an epic semifinal showdown Friday at the London Olympic Games. Federer will play in the gold medal match at the storied All England Club on Sunday.

The world No. 1 Federer won a war of attrition against the eighth-seeded Argentine del Potro, 3-6, 7-6 (7-5), 19-17, on the grass on the famed Centre Court. The Swiss great needed 4 hours, 26 minutes in the longest best-of-three match in the Open Era to stave off del Potro, who stunned Federer in the 2009 U.S. Open finale. The third set alone took 2 hours, 43 minutes to complete.

The previous longest men's three-set singles match was in a semifinal in Madrid in 2009, in which Rafael Nadal defeated Novak Djokovic in 4 hours, 3 minutes.

The 30-year-old Federer now awaits the Djokovic-Andy Murray winner.

Del Potro probably played as well as he could on Friday, while Federer fought himself, as evidenced by an uncharacteristic 41 unforced errors. The super Swiss could convert on only 2-of-13 break-point chances in the marathon affair.

But Federer was able to bail himself out with a brilliant service game on Friday.

He secured only his second break of the match to grab an 18-17 lead in the third set when del Potro netted a backhand, giving the Swiss his first match point of the day. Federer then netted a backhand volley to bring things back to deuce, but moments later, on his second match point, the Swiss legend advanced when the towering Argentine put one final backhand into the net.

Federer notched his first break of the day to take a short-lived 10-9 lead in the final set, but del Potro stunned the Swiss by breaking right back with only his second break of the bout.

The 17-time Grand Slam champion Federer out-aced del Potro 24-11 on Day 7 of this nine-day event.

Federer is now 13-2 lifetime against del Potro, including wins in their last seven matchups. The Swiss icon is a perect 6-0 versus the 6-foot-6 South American this year.

Del Potro will play Djokovic or Murray in the bronze medal match on Sunday.

The amazing Federer captured a men's-record-tying seventh Wimbledon title in this London suburb just last month, but still needs an Olympic singles title to complete a coveted career "Golden Slam."

Federer will seek career title number 76 on Sunday. He's 5-1 in his 2012 finals, including his first major title in 2 1/2 years when he ran the table here at the All England Club last month.