Davydenko won his fourth title of the season in China
Nikolay Davydenko beat Rafael Nadal 7-6 (7-3) 6-3 to win the Shanghai Masters and boost his chances of qualifying for the ATP World Tour Finals in London.
The Russian's early break in the first set was countered by the Spaniard but Davydenko produced three stunning backhand winners to take the tie-break.
The number six seed then broke the top-seeded Spaniard in the sixth game of the second set and served out the win.
Davydenko is now ranked seventh for November's eight-man event in London.
Roger Federer, Nadal, Andy Murray, Novak Djokovic and Juan Martin del Potro are the only players assured of their place at the showpiece finale to the season at the O2 Arena next month.
But Davydenko, who also won the Malaysian Open at the beginning of October, has put himself in a great position to take one of the three other available places with his fourth title of the season.
The Russian, who came through a three-hour semi-final against Djokovic on Saturday, said: "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."
He converted the third of his break points to open up a 2-1 lead in the first set, but an error in game eight handed Nadal a break back.
Davydenko then saved a set point before coming from 0-30 down in his next service game to take the set into a tie-break. A superb backhand cross court volley was followed by two backhands down the line as he wrapped up the first set.
World number two Nadal, who is still short of his best form following the knee and abdominal injuries which have disrupted his season, looked increasingly jaded as the match wore on.
And at 3-2 down in the second set, the Spaniard found himself 0-40 on serve and a wide backhand handed the break to his opponent.
Both players held on their next service games and Davydenko clinched his third win in five attempts against Nadal when the Spaniard hit a forehand fractionally long.