Andy Murray said his body let him down as he suffered with cramp in his opening match against Robin Haase at the US Open.
The Briton won 6-3 7-6 (8-6) 1-6 7-5 after three hours and eight minutes on a hot afternoon at Flushing Meadows in New York City.
But the start of the third set saw him start to struggle and he was in danger of a shock first-round exit.
"I was in a good position, and then my body failed me," Murray told BBC Sport.
"I panicked, because you don't know what to do. I got [my serve] broken at the beginning of that third set, and you think: 'What do I do? Do I try to conserve energy or do I try to finish it in three sets?'
"I don't really know how I managed to get through."
Andy said he felt cramping in several parts of his body and he couldn't serve at much more than 100mph in the third and fourth sets - a good 25mph off his usual pace
"It's the worst I have ever felt after an hour and a half of a tennis match," he added.
"I've played four-and-a-half, five-hour matches and felt pretty awful afterwards, but not after an hour and a half.
Murray will play German qualifier Matthias Bachinger in the second round on Wednesday or Thursday.