(CNN) -- Nikolay Davydenko came out on top in a high-quality final with top seed Rafael Nadal to win the Shanghai Masters title in straight sets on Sunday.
Davydenko collected his third Masters title after a superb Shanghai victory over Rafael Nadal.
The Russian was a break up early on but world number two Nadal appeared to be heading for victory when he levelled up and took the set into a tie-breaker.
However, the sixth seed came out on top before claiming the second set with a single break to seal a third Masters title with a 7-6 6-3 victory.
Davydenko drew first blood in the game three, taking Nadal to 0-40 before converting the third of his break-point opportunities from the net.
Nadal ended a run of three straight games for Davydenko by holding, but was forced to save two break points in his next service game, with Davydenko twice going narrowly wide.
Davydenko saved a break point in game eight, finding the lines with his groundstrokes to reach deuce, but a bad line call hindered him and he went long as Nadal levelled.
The pair were producing some stunning rallies and Nadal's defence saved him when Davydenko looked certain to earn two break points, then he came to the net to finish off another thrilling exchange and move 5-4 ahead.
Davydenko saved a set point with an overhead and levelled, then came from 0-30 down to take the first set into a tie-breaker.
The pair traded early mini-breaks, before a backhand down the line gave Davydenko the advantage and a miscued forehand from Nadal gave the Russian three set points -- the first of which he converted.
Davydenko maintained his level in the second set but was forced to save a break point in game five after a double fault let Nadal in.
And in the very next game he raced into a 0-40 lead, sealing the break when Nadal sent a backhand wide.
Davydenko took the next game with the help of a stunning backhand winner to put him within a game of the title, but Nadal held to make the Russian serve it out.
And the match ended in dramatic fashion as Nadal unsuccessfully challenged when his forehand went centimeters long.
Davydenko, who has now won three of his last five matches against Nadal, admitted he was losing belief as Saturday's three-hour semifinal win over Novak Djokovic started to take its toll.
He told Sky TV: "I was so tired at the beginning in the first set. At 4-4 I was thinking I have no chance to win. I cannot believe it. I'm enjoying this. Beating Djokovic and Nadal is something amazing."
The win gives Davydenko a great chance to qualify for next month's ATP Tour Finals in London, but he said: "I'll enjoy this week and I don't want to think about what's going to happen tomorrow or in the next event."