David Ferrer fought back from 4-1 down in the fifth set to clinch a remarkable win over Serbia's Janko Tipsarevic and reach his second US Open semi-final.
The Spaniard secured a 6-3 6-7 (5-7) 2-6 6-3 7-6 (7-4) win in four hours and 31 minutes on Arthur Ashe Stadium.
"I don't have words. I'm really happy. It was an emotional match. It was a lottery," said the fourth seed.
In the last four, Ferrer faces another Serb, Novak Djokovic, after he beat Juan Martin del Potro in straight sets.
Ferrer and Tipsarevic received a standing ovation before and after the decisive tie-break, and world number five Ferrer added: "Janko is an amazing player and he also deserved to win.
"I tried always to fight a lot, to be focused on every point. I was a break down, but I was fighting and I won."
Ferrer, aiming to reach a fourth major semi-final, was surprisingly out of sorts in the opening game as a wild forehand gifted the Serb an early break.
Tipsarevic's advantage soon disappeared as Ferrer, capitalising on the eighth seed's faltering first serve, broke back in the fourth game, the first of six games in a row as he took the opening set in 36 minutes.
Tipsarevic's tactics of advancing to the net more frequently paid dividends in a closely fought second set, although he was unable to trouble his opponent's serve as Ferrer produced eight aces.
Ferrer, enjoying the most successful season of his career, squandered four break points in the 10th game, and the set was decided by two delicious backhand winners and an unstoppable forehand into the corner in the tie-break.
Aggressive and seemingly buoyed by being the underdog, Tipsarevic hit 18 winners in an entertaining third set, his backhand a potent weapon as he broke in the fourth and sixth games.
He let slip two break points in the third game of the fourth set, however, and his generosity proved costly as Ferrer took the match into a decider after breaking in the eighth game.
The start of the fifth set was delayed because Tipsarevic needed treatment on his feet, but, having saved three break points in the opening game, he seemed unhindered as he broke in the second game and sauntered into a 4-1 lead.
With the finishing line in sight, Tipsarevic stumbled at the end of the sixth game and Ferrer broke immediately.
Facing two break points in the ninth game, Tipsarevic needed more treatment - this time on his thigh - before Ferrer secured victory in a nervy tie-break.