Roger Federer saw his five-week unbeaten run come to an end in front of his home crowd as Jiri Novak fought back to claim the Swiss Open title.
Roger Federer was going for his sixth title of the year
Federer came into the final on the back of a 15-match unbeaten streak that included titles at Halle and Wimbledon.
But Novak, who won the Gstaad title two years ago, recovered from dropping the opening set to come through 5-7 6-3 6-3 1-6 6-3.
"I must be one of the happiest men in the world right now," said Novak.
"I've won the title here twice and won my fifth ATP title. Roger played excellent but I was maybe a little better."
Federer came straight to Switzerland on Monday following his victory at Wimbledon as he looked to win his first title on home soil.
But, in contrast to last week, the 21-year-old made numerous unforced errors and hit as many double faults as aces.
A comeback in the fourth set, when he twice broke Novak's serve, gave the Swiss crowd hope.
But the decisive break came from Novak in the sixth game of the final set, and the Czech player held on for a deserved win.
"It's very disappointing and frustrating, even if it was a great week," said Federer. "It's the third final I've lost at home.
"I did all I could, but it was not enough. His return of serve is one of the best out there on the tour and today he returned very hard.
"It's a pity because I had a chance to win here and I didn't take it.
"This was a marathon for me, playing matches every day or every other day for the last several weeks. Luckily I've got vacation time now.
"I haven't had any time for a little glass of champagne to celebrate Wimbledon - that
might be nice to do now."
And Novak paid tribute to the efforts of his opponent in recent weeks.
"I have to congratulate Roger," said Novak.
"It's not easy stringing all those matches together, nor changing from grass to clay."