Rafael Nadal dropped his first set of the US Open but avoided following Roger Federer out of the tournament as he fought back to defeat Philipp Kohlschreiber in the fourth round.
Nadal and Kohlschreiber were in the first set of their clash when Tommy Robredo knocked Federer out in straight sets.
Initially it looked like the much-anticipated quarter-final between Federer and Nadal may instead pit Robredo against Kohlschreiber when the German won the first set but Nadal ran out a 6-7 (4/7) 6-4 6-3 6-1 winner.
Playing at the top of his game, 22nd seed Kohlschreiber kept Nadal at bay and then clinched the first set on a tie-break.
But the Spaniard was guilty of not taking his chances, and it was the same story as Kohlschreiber fought back from 0-40 in a lengthy game to hold for 2-1 in the second set.
The break was coming, though, and Nadal pumped his fist as he finally forged ahead 4-3, going on to level the match.
Kohlschreiber was hanging on by his fingernails but his grip was loosening and Nadal took just his second of 17 break points to move 2-1 ahead in the third.
From then on it seemed just a case of how quickly the second seed would manage to wrap up victory.
Kohlschreiber forced his first break point of the match at the start of the fourth set, and he should have secured the first break of the Nadal serve all tournament but dumped a routine smash into the net.
Nadal was not so charitable in the next game, and Kohlschreiber was just relieved he did not suffer the ignominy of a love set as he finally got on the board in the sixth game.
But Nadal wrapped up an impressive victory in the next game after three hours and 12 minutes to book a date with his Spanish compatriot Robredo.
The humidity level was measured at 91%, and Nadal said: "It was very tough conditions out there.
"I sweated too much tonight. The opponent was great. He had good chances, the first set he played great. I feel lucky to be through. I fought a lot and it's amazing to have this victory in this full Arthur Ashe stadium."
Nadal did not know Federer had gone out until the end of the match, and he said of facing Robredo: "He's playing great, I'm happy for him.
"He had similar circumstances to me, he came back after a tough injury. I'm happy to see him back on the tour. He's had an amazing career, he's playing a great tournament. Winning against Roger in the US Open is amazing."