Roger Federer recovered from dropping the first set of his US Open campaign to squeeze past Indian qualifier Sumit Nagal.
Nagal, a 22-year-old from New Delhi playing in his first grand slam, could not believe his luck as the 20-time major champion made 19 unforced errors to gift him an unlikely lead.
The Swiss great's timing seemed to have deserted him as straightforward forehands floated wide and backhands looped high and long.
The build-up to the first-round match centred around not confusing Nagal with his near-namesake Rafael Nadal, yet 35 minutes in the scoreline only seemed credible had Federer been facing the Spaniard.
However, Federer also lost his first set at this year's Wimbledon to little-known Lloyd Harris, and went on to reach the final.
The 38-year-old bucked his ideas up at the start of the second set, breaking Nagal with a fourth break point, and then repeating the dose to take a 5-0 lead.
Federer was by now hitting the lines he had previously been missing by a distance and the match was quickly level, although Nagal was still enough of a nuisance to save six set points before succumbing.
But Nagal's hustling was no longer hassling Federer, a double break in the third putting him firmly in control.
There was no way back for Nagal, despite another break in the fourth, and a relieved Federer's 4-6, 6-1, 6-2, 6-4 victory was wrapped up with an unreturnable serve.
"It was a tough first set for me, credit to him for playing a solid first set and I missed a lot of balls," he said.
"It all came back just in time and I actually played some good tennis so I'm happy. It was nice to serve it out."
Federer faces Damir Dzumhur of Bosnia in round two.