Andy Murray came from two sets down in sweltering heat to beat France's Adrian Mannarino and reach the US Open third round.
In temperatures pushing 33 degrees Celsius in New York, Murray failed to find his best form until it mattered most as the world number three came roaring back to win 5-7 4-6 6-1 6-3 6-1.
It is Murray's 30th consecutive grand slam in which he has made round three and he will now play Brazil's Thomaz Bellucci for a place in the last 16.
BECOME A WRITER
Do you have what it takes? Sign up today and send over your 250 word test article: http://gms.to/haveyoursay3
"It was extremely tough," Murray said.
"He hits the ball very flat and has fantastic timing off both sides with a very short backswing so it's very difficult to read where he hits the ball.
Article continues below
"I was leaving it short at the beginning but thankfully in the third set I managed to get a break.
"He was serving really well and I was missing a few returns. It was a tough match."
The construction of a new roof in Arthur Ashe stadium means less wind but more heat than in the past and Murray will know the potential consequences of spending too long on court in the early rounds.
He was sluggish from the start, conceding two break points in the opening game and allowing Mannarino to break with a weak forehand into the net.
The advantage was short-lived as Murray instantly restored parity but the pattern was very much set as the left-handed Mannarino pushed and probed, waiting for his opponent to make a mistake.
Murray, usually a model of consistency from the baseline, was indecisive and when another mistake gave away a break at 5-5, Mannarino capitalised to close out the set.
The heat was intense and while there are few players physically more resolute than Murray, the Scot seemed in particular discomfort.
He had called for clean towels midway through the opening set and an ice-towel to wrap around his neck, while two different types of water and energy gels were routinely consumed at changeovers.
Energy on the court, however, continued to be lacking and another lethargic set ended with Mannarino breaking Murray, following a limp backhand into the net, and then serving out to love for a two-set lead.
Staring down the barrel of a first grand slam exit at such an early stage since January 2008, Murray jolted himself into life as he skipped into the first change of ends before breaking his opponent twice to wrap up the third set in just 31 minutes.
Murray often plays best when his adrenaline is pumping hardest and after an unlikely success at the start of the fourth, the Scot indulged in an almost football-like celebration, pointing his finger in the air and then beckoning the applauding crowd to rise to their feet.
Five break points came and went but Murray was on the march, playing with more urgency, purpose and precision, while attacking the net with greater regularity.
There were still outbursts of frustration, which on occasions appeared directed towards his own box, but Murray claimed two breaks to win the fourth set with ease.
The momentum was now firmly with the Briton and Mannarino was powerless to prevent it continuing into the decider, where Murray won the first three games in a row.
The Frenchman did put one notch on the scoreboard but that was all he could muster as Murray finished with an ace to seal victory in three hours and 17 minutes.