Roger Federer beat nemesis Rafael Nadal 2-6 6-2 6-0 to win his fourth Hamburg Masters title and end the Spaniard's record run of 81 straight wins on clay.
Federer had never beaten Nadal on clay before
World number one Federer struggled in the first set and the Swiss player then faced break points early in the second.
But saving them spurred him on to break twice himself to claim the second set.
Nadal began to look jaded as Federer raced through the decider 6-0, breaking three times for his first win on clay against the 20-year-old.
"It's absolutely a breakthrough. It will be interesting to see how we both react in the French Open," said Federer.
"For me it's just nice to be playing well again. I'm feeling very good going into the French Open.
I will go to the French Open just as confident
"It's not that I was playing so badly but it's my first clay-court title in a couple of years so that's great."
Left-hander Nadal had won all five previous meetings on the surface, including a comfortable straight-sets win last month at the Monte Carlo Masters.
Federer's victory also ended his own run of four tournaments without a title, his worst spell since he became world number one in February 2004.
Nadal's 81-match winning streak on clay was an all-surface record.
After winning in Rome last week, many expected the 20-year-old to skip the tournament in Hamburg and he admitted fatigue had caught up with him on Sunday.
"Maybe I was not the same like always mentally. I feel a little tired mentally, but physically I was OK," he said.
"I have had a lot of matches and it's difficult, but I am very happy to have played Hamburg.
"I made more mistakes than usual - I played very short and he feels the ball well.
"But I came here and played some of my best tennis (during the week) and I can't be sad that I lose one match to the world's best player."
The world number two had won 13 consecutive tournaments on clay and had last lost on the surface to Igor Andreev in the Valencia Open quarter-finals in April 2005.
Later this month the Spaniard will attempt to win his third consecutive title at the French Open, the only Grand Slam event to so far elude Federer.
Nadal added: "I will go to the French Open just as confident."