Tim Henman fought his way into the US Open fourth round with a 4-6 6-3 5-7 6-4 6-3 win over Michal Tabara.
Henman was expected to breeze past the Czech qualifier, but he was outplayed in the first set as Tabara reeled off a string of return winners.
The fifth seed was troubled by his injured back but having found himself down two sets to one, he found his form to force a decider.
And though he was never at his best, a battling Henman just survived.
He will meet Germany's 19th seed Nicolas Kiefer as he bids to reach the US Open quarter-finals for the first time in his career.
The Briton admitted his back problem was still a cause for concern.
"My energy levels were fine but towards the end, during the changeovers, my back was getting quite stiff," he said.
"After a changeover, I find on the first couple of serves I feel stiff and there isn't much flexibility there.
"But I kept fighting and that's the most important thing. I can certainly play better but at least I've given myself a chance to do that."
Henman had to come from behind in his opening five-set win over Ivo Karlovic.
But while he was expected to be tested by Karlovic, Tabara, ranked 192 in the world, was not supposed to cause too many problems.
But Tabara began in scintillating fashion, picking off Henman's first serve at will from the outset and breaking to love at 1-1.
He could even afford to squander three further break opportunities at 3-1 before taking the first set comfortably.
But Tabara's hot streak ended as the second set began and Henman raced into a 4-0 lead with two breaks of serve before levelling the match at one set all.
The fifth seed appeared to have got to grips with his erratic opponent when he jumped out into a 2-0 lead in the third set, but yet another backhand winner from Tabara fired him level at 3-3.
It took the wind out of Henman's sails and Tabara hit form at just the right time, unleashing a forehand return winner to take the set 7-5.
Henman stuck grimly to his task, despite his apparent annoyance at the noise coming from the adjacent Grandstand Court and the pain coming from his troublesome back.
He established a 3-0 lead, and though he once again squandered one of his breaks of serve, he doggedly forced a deciding set.
For the third time in a row, Henman broke in the opening game of the set and then used his greater experience to hang onto the advantage.
The British number one rounded off an otherwise scrappy encounter with a classy forehand winner which gave him a second break of serve and a place in the fourth round for the third time in his career.