Third-seed Rafa Nadal came within two points of defeat by old nemesis Lukas Rosol before sparking into life and reaching the second round of the Swiss Indoors tournament in Basel.
Spaniard Nadal was in all sorts of trouble, trailing by a set and 5-4 and with 69th-ranked Rosol serving at 30-0, but his Czech opponent framed a basic backhand volley at 30-15 and blew his chance, Nadal going on to win 1-6 7-5 7-6(4).
A Rosol double fault allowed former world number one Nadal to take the second set and the decider looked like being a no-contest as Rosol's challenge began to unravel.
Nadal moved a break ahead but, at 4-2, Rosol played some stunning groundstrokes to earn three break points and though Nadal saved two of them he then blazed a forehand long.
There has been no love lost between the players since Rosol stunned Nadal in the Wimbledon second round in 2012, with Nadal gaining revenge at the 2014 Wimbledon tournament.
"It was a very tough match emotionally," Nadal, who lost the opening set in 23 minutes, said.
"At the same time, it's a great victory. It's important for me to have these kinds of comebacks. I've been in these situations more times than I would like this year, so I'm happy to win a match like this."
Fourteen-times grand slam champion Nadal, who has already booked his place at the ATP World Tour Finals despite a relatively lean year, will play Bulgaria's Grigor Dimitrov or Ukraine's Sergiy Stakhovsky in round two.