World number one Novak Djokovic was tested for the first time at this year's US Open as he beat Russia's Mikhail Youzhny in the quarter-finals.
Djokovic, 26, came through 6-3 6-2 3-6 6-0 in the night session at Arthur Ashe Stadium to reach the semi-finals for the seventh year running.
The Serb had not dropped a set in his opening four matches, and had only once lost more than three games in a set.
But the battling Youzhny extended him over two hours and 34 minutes.
"It was never going to be an easy match against Mikhail in the quarter-finals of a Grand Slam, and I was aware of his qualities and ability to come back," said Djokovic.
"After I lost the third set I definitely tried to regroup and focus on every point individually and start playing the same game that I had in first two sets.
"It was important to get the early break in the fourth. I have done that, and after that I really felt a big relief on the court and just went for my shots and played great."
Djokovic goes on to face Stanislas Wawrinka in Saturday's semi-finals after the Swiss ninth seed earlier knocked out defending champion Andy Murray.
Rafael Nadal had lost just four games in thrashing Tommy Robredo the previous night, and Djokovic looked on course to make similarly short work of 21st seed Youzhny after two sets.
But the 31-year-old Russian has previously reached two semi-finals at Flushing Meadows, beating a 20-year-old Nadal along the way in 2006, and would not give up his chance of a third without a fight.
Djokovic saved an early break point in the first set before breaking to love, and overcame a few signs of nerves when he failed to serve it out from 40-15 and had to save a break point.
A spectacular backhand off a Youzhny smash finally gave him the set and prompted a huge roar from the 2011 champion in the direction of his team in the stands.
Youzhny was broken twice in dropping the second set - the second time thanks to a cruel net cord as a result of Djokovic's deadly backhand slice - but the Russian was not about to capitulate.
With the night crowd desperate for a contest, Youzhny stormed into 4-1 lead in the decider and held off a Djokovic fightback when the Serb double-faulted to hand over a second break.
Djokovic had made an uncharacteristic 16 unforced errors in the third set and was not in the mood to give his opponent any more help.
Stepping up the intensity markedly he left Youzhny helpless in the face of 10 winners, reeling off the last six games and securing victory with a forehand deep into the corner.
"I have been very satisfied with my performances overall in the whole tournament so far," Djokovic added.
"And even tonight, even though I dropped a set, I feel I was in control of the whole set. I played great.
"To finish off the match with a 6-0 win against Youzhny, it's definitely encouraging for me for the next challenge."
Earlier in the day, top-seeded American doubles duo Mike and Bob Bryan suffered a surprise 3-6 6-3 6-4 defeat by India's Leander Paes and the Czech Radek Stepanek, ending their hopes of completing a clean sweep of 2013's Grand Slam titles.