Britain's Andy Murray kept his US Open hopes alive as he recovered from two sets down to beat Dutchman Robin Haase in the second round.
The Scot, 24, battled through 6-7 (5-7) 2-6 6-2 6-0 6-4 on the Louis Armstrong Stadium and will face Spain's 25th seed Feliciano Lopez next.
Fourth seed Murray played so poorly for two hours that an upset seemed likely.
But the Briton held on and edged through a dramatic final set after letting a 4-0 lead disappear.
Haase went into the match having won their only previous encounter in Rotterdam three years ago and after claiming his first ATP title in Kitzbuhel earlier this month.
Murray had predicted that Haase would come out firing and the Dutchman confirmed that on the very first point with a blistering forehand winner.
Haase deservedly got the first break at 3-3 and was completely untroubled on serve until the time came for him to close out the set, when he tightened up and slipped to 0-40 before firing a forehand long.
At last, Murray looked to have gained the upper hand as he moved 4-1 clear in the tie-break but a desperate passage of play handed Haase five points in a row, and the world number 41 converted his second set point.
Nineteen unforced errors told the story of Murray's first set and things got a whole lot worse as he dropped serve at the start of the second, before failing to convert from 15-40 in the next game.
The forehand that had looked impressive was breaking down regularly but he finally strung two together to get the break back in game five, only to gift it back with a double-fault.
With the confidence now flowing, Haase was in irrepressible form as he broke again to take the second set and Murray needed to make something happen quickly if he was to wrestle back control.
The moment came at 1-1 in the third when he fought back from 40-0 down to break, letting out a huge scream, and after two hours on court the Briton broke once again to secure the set.
Haase had lengthy treatment to his back at the changeover before again letting a 40-0 lead slip to give the now energised Murray the advantage early in the fourth.
As the Dutchman wilted, the benefit of Murray's punishing fitness regime began to tell and he reeled off 13 games in a row, with a running forehand winner off a Haase smash charging up the New York crowd.
At 4-0 to Murray in the final set, the drama appeared to be over, but far from it.
Haase came roaring back to make it 4-4, only to drop his own serve with a tired, error-strewn service game, but when Murray finally had the chance to serve out the match there were more twists to come.
A nervous Murray double-faulted for the eighth time to make it 0-30, survived a break point when Haase smashed a second serve return into the net, saw a second match point denied by Hawkeye, and finally clinched it when the Dutchman sent a return long.
"It was a tough match and if I play like I did today I might be going home," said Murray.
"Maybe I should have won the first set tie-break, I need to make sure I'm moving well in the next match otherwise it's bad news.
"I just wasn't playing well (at the start of the match), I was moving really poorly and that's not good for my game. Once I started to move better towards the end of the third set my game was so much better."
Haase revealed that the back problem, which required attention on three separate occasions, has been an issue for some time.
"Today I woke up at two o'clock that I couldn't sleep for two hours," he said. "I was just walking down the corridor in the hotel because I was in so much pain."
The victory saw Murray become the third player behind Novak Djokovic and Rafael Nadal to guarantee a place at the ATP World Tour Finals in London in November.