Andy Murray saved five match points before going on to beat Tommy Robredo 5-7 7-6 (11-9) 6-1 in the Shenzhen Open final in China.
The Scot was broken in the first game of the match and also at 5-5 on his way to losing the first set.
Murray was 6-2 behind in the second set tie-break before valiantly recovering to win it 11-9 and force a decider.
He broke a tiring Robredo three times in the third as he won his first title since winning Wimbledon last year.
Murray said: "I got lucky, basically, at the end of the second set. I fought hard, tried my best and thankfully managed to turn it round."
The victory moves Murray up to 10th in the rankings in the race to reach the ATP World Tour Finals in London during November, with the top eight qualifying.
|BBC tennis correspondent Russell Fuller|
|"Murray didn't face a single top 20 player in Shenzhen this week, but will still gain a huge amount of confidence from being a title winner once again."He had played inconsistently for much of the final, but zoned in magnificently to recover from 6-2 down in the second set tie-break."Murray now heads to Beijing and Shanghai in a much healthier position to qualify for the World Tour Finals, but the stakes will be higher and the fields much deeper over the next two weeks."|
The 27-year-old is now 105 points behind Tomas Berdych, who is currently eighth, and is next scheduled to play at tournaments in Beijing, Shanghai and Paris.
Murray had beaten Robredo in the third round at SW19 last year and, in their first meeting since then, again emerged victorious - albeit following a closely-fought contest.
The Scot opened the match with two double faults on his way to losing the first game and, despite recovering the break, again gave up his serve at 5-5.
A powerful forehand return to Murray's feet was put long by the Scot as Robredo went 6-5 up before holding his nerve to close out the first set.
Murray came back from 0-40 at 3-2 to break Robredo in the second set, only to be broken straight back in the next game.
|ATP Race To London (top eight qualify)|
|Qualified: 1st: Novak Djokovic (8,150 points); 2nd: Roger Federer (7,020); 3rd: Rafael Nadal (6,645)|
|Still to qualify: 4th: Stan Wawrinka (4,795), 5th: Marin Cilic (3,935), 6th: Kei Nishikori (3,675), 7th: David Ferrer (3,535), 8th: Tomas Berdych (3,510), 9th: Milos Raonic (3,440), 10th: Andy Murray (3,405) 11. Grigor Dimitrov (3,355)|
|Murray's schedule: Beijing - 500 points to the winner; Shanghai - 1,000; Paris - 1,000.|
The Spaniard saved two set points at 5-4 down before the second set went to a tense tie-break.
Murray appeared beaten when facing four match points in a row, only to save them all as well as another at 7-6, as he fought back to win 11-9 courtesy of some powerful forehands.
That proved to be the breaking point for Robredo as he succumbed to the sapping heat and a determined opponent, with Murray raced through the third set.
Meanwhile, Murray's older brother Jamie and doubles partner John Peers were beaten 3-6 7-6 (7-5) 10-5 in the Malaysian Open doubles final in Kuala Lumpur by Marcin Matkowski and Leander Paes.
In the singles final, US Open runner-up Kei Nishikori of Japan beat Frenchman Julien Benneteau 7-6 (7-4) 6-4.
British number two James Ward has failed to qualify for the ATP tournament in Tokyo after retiring against American Rajeev Ram.