Roger Federer survived the threat of a huge upset to beat Spain's Feliciano Lopez 3-6 6-4 6-1 6-4 and reach the quarter-finals of the US Open.
The three-time defending champion was in trouble as Lopez's big serving and sharp volleys gave him the first set.
But Federer edged a tight second by breaking in game 10 and then found his best form to race to victory.
The world number one goes on to face Andy Roddick in the last eight in a repeat of last year's final.
"(Lopez) was playing fantastic for the first two sets, dictating play, serving unbelievable," said Federer.
"When you do lose a set you start to wonder, 'Maybe this is the night it's not going to work out for me'. But I played great at the end."
Federer, who is gunning for his 12th grand slam title, holds 13-1 head-to-head record against 2003 champion Roddick.
He added: "That's a great record that doesn't help me. It's a new day and anything is possible."
Earlier, 10th seed Tommy Haas saved three match points before beating sixth seed James Blake in a gripping final-set tie-break to reach the quarter-finals.
American Blake looked to be cruising at a set and a break up but German Haas fought back to level the match.
"You don't want to advance because someone else isn't feeling well"
Blake took the third set but then began to tire as Haas suddenly hit a purple patch to reel off eight straight games.
Haas let slip a break in a tense final set and had to save match points before winning 4-6 6-4 3-6 6-0 7-6 (7-4).
Haas will play Nikolay Davydenko in the last eight after the Russian beat Hyung-Taik Lee 6-1 6-3 6-4.
"I tried to stay calm and fight for every point," said Haas. "It's great. To be in the quarter-final once again is an awesome feeling."
Blake said: "He served great when I had match points, made every first serve. I had chances in the breaker and didn't take them."
Andy Roddick enjoyed an easy passage into the last eight after his opponent Tomas Berdych retired ill during their fourth-round match.
606: DEBATE
Fifth seed Roddick saved a set point to win the first set tie-break.
Ninth seed Berdych had been treated by the trainer early on in the match but began to look weak and feverish as the first set progressed.
And when he went 2-0 down in the second set, the Czech decided to call it a day, giving the American victory.
It is the second time in the tournament that Roddick has profited from an opponent's withdrawal.
Argentina's Jose Acususo retired during their second-round match.
"You don't want to advance because someone else isn't feeling well," said Roddick, who hit 10 aces against Berdych.
"I could tell he was hurting. It's unfortunate but I'm in the quarters and I hope I can go a little further."