Basel, Switzerland: Juan Martin del Potro denied Roger Federer his hometown Swiss Indoors title for the second straight year, winning the final 7-6 (3), 2-6, 6-4 on Sunday.
The top-seeded Argentine clinched the title when Federer could not return a forcing forehand.
Federer had hoped the raucous support at Basel, where he is a five-time champion, could help revive his difficult season but has now won just one title in the past 14 months.
Still, the sixth-ranked Swiss edged closer to securing his place in the eight-man lineup at the ATP World Tour Finals in London starting a week from Monday.
Del Potro earned his fourth title this season, all on his favored hard-court surface. He also won at Rotterdam in February, Washington D.C. in August and Tokyo this month.
With this loss, Federer still has only one victory against a top-10 opponent in 2013. That was back in January, against then-No. 8 Jo-Wilfried Tsonga in the Australian Open quarterfinals.
Federer will likely confirm his London place at the Paris Masters next week, where he is seeded fifth and has a second-round match against Kevin Anderson of South Africa or Mikhail Youzhny of Russia.
Though the 32-year-old Federer still holds a 13-5 record against del Potro, he has lost the last three including the 2012 Basel final.
On Sunday, Federer lost the first set despite playing some of his best tennis this week.
After del Potro forced a 5-3 lead with the first break, Federer responded with four straight points on his opponent's serve and shouted in triumph.
Facing two set points in the next game, Federer hit an ace and won a long, slugging rally that brought a yell of delight from the sold-out crowd of 9,200.
Still, del Potro dominated the tiebreaker helped by two net cords in his favor, and clinched the set when Federer sent a forehand wide.
Federer leveled the match with much less drama in the second set, after breaking to take a 2-0 lead with a forehand crosscourt winner.
He broke again to clinch the set, set up by a pinpoint forehand winner, and got a standing ovation as he headed back to his seat.
Federer quickly wasted the advantage of serving first in the decider, despite saving a break point with a leaping backhand overhead winner after del Potro's deft lob. He double-faulted to give del Potro a second opportunity and then hit a forehand long.
Del Potro spurned a good opening to lead 5-2 when he netted a forehand approaching the net after Federer's drop shot sat up invitingly.
Serving for the match, del Potro hit an ace to set up three match points, and converted the second with strong ground strokes to move Federer around the court.