BASEL, Switzerland (AP) -- Top-ranked Roger Federer lost his hometown tournament on Sunday, falling 6-4, 4-6, 6-2 to Novak Djokovic in the Swiss Indoors final.
Djokovic earned his fourth tournament win of the season with a victory that ended Federer's run of three straight titles at the event.
"It's disappointing to lose at home in the finals, no doubt," Federer said. "I thought I missed plenty of opportunities. I'm not looking for excuses. He played tough and he played well when he had to, and saved a ton of break points that were crucial."
Djokovic improved to 3-2 this year against Federer, who he called the best tennis player.
"I have to produce something special to win," Djokovic said at sold-out St. Jakobshalle. "I think I played one of the best matches of the year."
The second-seeded Serb clinched the first set by saving five break points in a game that lasted 24 minutes.
"It may be the longest I have ever played in my life," Djokovic said. "It was maybe the turning point in the whole match. I was fortunate to keep my nerves."
Federer fought back from a break down to win the second set and rouse his partisan fans.
Djokovic raced to a 4-0 lead in the decider, and closed out the victory after Federer wasted three break points in the sixth game.
It was a tour-leading 71st win this year for Djokovic, who improved to 4-5 in finals in 2009. His other title wins were at Dubai, his home event at Belgrade, and Beijing last month.
Federer is now 59-9 this year after losing only his third match since May.
The first set went with serve, until Federer was broken for the first time in the tournament to trail 5-4. Then came that tense, error-strewn game that featured 11 deuces before Djokovic took his seventh set-point chance.
Federer dropped serve again to open the second set, sending another forehand into the net. But he won his next service game, and then broke his opponent for the first time when a drop shot grazed the net cord before falling in play.
He broke Djokovic's serve again to win the set when the 22-year-old Serb sent a forehand into the net. Djokovic rallied immediately in the decider, Federer dropping two straight service games for the second time in the match.
Trailing 4-1, Federer held three break points at 0-40 but was let down again by his groundstrokes as Djokovic reeled off five straight points. Djokovic needed just one match point to clinch, as Federer mistimed a backhand from the baseline.
Federer had twice before been runner-up at Basel, where he was once a ballboy. He lost to Thomas Enqvist of Sweden in 2000, and to Britain's Tim Henman the following year.
Copyright 2014 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.