Novak Djokovic gained sweet revenge for his US Open defeat to Andy Murray on Sunday, saving five match points to seal a stunning 5-7 7-6 (13-11) 6-3 victory in the Shanghai Masters final.
The iron-willed Serbian was second-best for long stretches but refused to be beaten. He sealed his 13th Masters title in a contest lasting three hours and 21 minutes as he pursues Roger Federer at the top of the rankings.
The thrilling duel, played out in front of a packed crowd at the Qi Zhong Stadium, hinged on a monster second-set tiebreak that lasted more than 20 minutes, which the second seed won to stay alive in the match.
The defeat, in a match packed with high-quality tennis, was British third seed Murray's first loss at the Shanghai Masters after he won the tournament in 2010 and 2011.
"Could have easily gone the other way. He was five match points up," said Djokovic. "When I faced those match points, I tried to focus on each individually.
"We were very close."
The Serbian said the title would give him an injection of confidence as he closes in on the top spot in the rankings, which he said was his "biggest objective".
"It's something I'm aiming for. Obviously this is going to be a huge confidence boost and also is going to help me in the race for No.1," he added.
A gruelling first set contained seven breaks of serve as the players went toe-to-toe in a breathtaking display of power hitting, with neither able to grab the initiative.
But Murray made what proved to be the crucial breakthrough in the 11th game, recovering from 40-love down to break for a 6-5 lead as an infuriated Djokovic destroyed his racquet, tossing it away in disgust.
It was a different story in the second set, with both players secure on serve until the defending champion broke in the seventh game to lead 4-3 when Djokovic netted with a volley.
But agonisingly for Murray, 25-year-old Djokovic, refusing to be beaten, saved a match point to pull level at 5-5 and the set went into the dramatic tiebreak.
The Serbian denied the Scot four more times in the shoot-out, sealing the set with a drive volley that was followed by a trademark fist-pumping celebration as the Scot destroyed his racquet.
The third set went with serve until Djokovic made the vital breakthrough to lead 4-3. Murray could not find a way back, being broken again as the Serbian sealed the match.
"I'm obviously disappointed I lost the match," said Murray. "But it was a top-quality match. Both of us played some unbelievable tennis at times.
"It was literally the difference of one, two centimetres in winning the match and losing it. You have to put things into perspective."
Murray beat his rival in five sets in last month's US Open final to secure Britain's first men's grand slam singles title since the 1930s, just weeks after his Olympic triumph in front of home fans in London.
Djokovic came into the match on a 9-0 winning streak since losing to Murray in New York, a run that included his third China Open title.
The Serbian enjoyed one of the finest seasons in tennis history in 2011, winning three grand slams.
He is hot on the heels of Federer as he tries to secure the year-end No.1 ranking for the second year in a row.