Juan Martin del Potro took Roger Federer's Swiss Indoors title on Sunday, beating the hometown favorite 6-4, 6-7 (5), 7-6 (3) in the final.

Del Potro showed an impressive all-around game to help avenge a heartbreaking loss to Federer in the Olympic semifinals at Wimbledon in August.

"It was an unbelievable final," said Del Potro, who never dropped serve and raised his game in the decisive tiebreaker. "You can't wait, you have to go to (get) the victory."

Federer, who won the event in five of the past six years, was seeking his 77th career title to tie John McEnroe at fourth on the Open Era list.

"I didn't play a good tiebreaker in the third and that was the story of the match," said Federer, offering generous praise to his opponent who won the 2009 U.S. Open then sustained a serious wrist injury. "I definitely think he is right there again."

Federer later pulled out of his defense of the Paris Masters, which starts Monday, to rest and prepare for the ATP World Tour Finals in London the following week.

"It's the only right decision for me right now," the 31-year-old Federer said. "I had some niggling stuff and I didn't want to take a chance."

Del Potro ended a six-match losing streak against the top-ranked Swiss this year, which included a five-set defeat at the French Open.

"This time it was for me," said Del Potro, who improved to 3-13 lifetime against Federer. The first of those victories was in the 2009 final at Flushing Meadows.

The 24-year-old Argentine won for the second straight week after taking the Vienna title. His fourth title of the season is the 13th of his career.

Del Potro's victory came in 2 hours, 44 minutes compared to his 4-hour, 26-minute defeat at the London Olympics — the longest three-set match in history — when Federer won the decider 19-17 on Centre Court the All England Club.

As he did at Roland Garros and the Olympics, Del Potro took the first set, breaking Federer's serve in the fifth game. Federer struggled briefly with his ground strokes, netting two forehands and a backhand to give Del Potro the lead.

The second-seeded Del Potro relied on solid serving and unleashed blistering forehands when needed. He took his first set point chance when Federer sent a backhand wide.

Both players wasted their only break chances in the second set, which hinged on a tense Federer service game at 5-5.

Facing break point, Federer struck a forehand crosscourt winner then saw Del Potro slip up by netting a sliced backhand on the next point. Federer controlled the tiebreaker and punched the air when he evened the match, as Del Potro let a backhand drift wide.

Federer held three break points at 1-1 in the third, but Del Potro saved them before firing an ace to win the game. A wild Federer forehand let another break chance slip in the seventh game, which Del Potro clinched with another ace.

"He was playing really at the limits, and that is the way to win these matches," said Del Potro, who will likely remain No. 8 when the rankings are updated Monday.

Federer then struck three straight aces when threatened at 6-5 down to force another tiebreaker.

Del Potro seized his chance after Federer netted a topspin forehand, and clinched his first match-point chance on another wayward forehand from the top-seeded Swiss.