Roger Federer ground out a difficult 6-4 6-7 (3-7) 6-3 6-4 victory over Nicolas Kiefer to reach the last eight.
The German took a 2-0 lead in the opener but the top seed broke twice to begin business as usual in New York.
The players swapped breaks in the second and Kiefer pounced on Federer's sloppy forehands to win the tie-break.
Federer showed greater urgency in the third and broke to move ahead before pressing forward to set up a meeting with 11th seed David Nalbandian.
Federer looked rusty in the first set at Flushing Meadows but did enough to see off Kiefer.
Despite taking the opener, the world number one did not step up a gear and uncharacteristically slammed down his racquet as Kiefer took a 2-0 lead in the second.
The unseeded German gifted Federer the break back with a series of unforced errors at 3-2 and from then on the set played out in lacklustre fashion.
The Swiss struggled to find his range with his forehand and Kiefer took advantage to take the tie-break and level the match.
Kiefer appeared to have the upper hand in the third, forcing Federer to save break-points in the very first game.
But the world number one slowly found his rhythm, lashing down groundstrokes with greater aggression and purpose.
The pressure told on his 28-year-old opponent as he surrendered the break at 5-3 and watched as Federer served out the set.
Kiefer, who received treatment on a foot injury during the changeover, was tamely broken at 2-1 in the fourth.
Federer - now back to his steely best - closed out the set and the match in just over three hours.
Afterwards, he was relieved to reach the quarter-finals, saying: "It was a difficult four sets.
"This was the first time I've lost a set here and it is always a strange feeling. But my reaction was good.
"I was not so happy with the way I was playing. I thought the third set shifted the momentum and I started to feel in control again in the fourth."