Defending champion Rafael Nadal survived an epic US Open quarter-final confrontation to defeat battling ninth seed Dominic Thiem 0-6, 6-4, 7-5, 6-7, 7-6 and reach the semi-finals for the seventh time.
In a gripping four-hour, 49-minute contest which concluded at 2.04am on Wednesday, world No 1 Nadal won through to keep his bid for a fourth title in New York and 18th grand slam crown on track.
However, the 32-year-old was fortunate to triumph on another hot and humid night at Flushing Meadows, 24 hours after Roger Federer had been dumped out of the tournament by John Millman.
After suffering a first set "bagel", Nadal had to battle back from breaks in the third and fourth sets before seeing off the first top 20 player he had faced at the US Open since 2013.
Del Potro beats Isner and sweltering conditions to reach US Open semis
Serena speaks out on Kaepernick after reaching US Open semis
Stephens dumped out of US Open even as other contenders feeling the heat
Sharapova knocked out as Keys and Osaka advance to quarter-finals
"I suffered, that's the right word," said Nadal after playing his longest ever match at the tournament.
"I said to Dominic I am sorry. He's a great guy, a close friend who will have many more opportunities to win the big titles.
"He has a great attitude and is a great fighter."
In a dramatic final set, Nadal saw five break points come and go before Thiem went long with a smash on the first match point.
It was his 58th unforced error on a night when he sent down 18 aces and fired 58 winners.
The semi-final will pit Nadal against third seed Juan Martin del Potro for the second successive grand slam.
At Wimbledon, Nadal came back from two sets to one down to win in five in a quarter-final which stretched to almost five hours.
Thiem broke three times in a 24-minute first set, handing Nadal just his third "bagel" at a grand slam.
The top seed won just seven points in the opener.
"I told myself 'wake up'," said Nadal.
Nadal then recovered from being broken as he served for the second set in the ninth game with an immediate break back to level the contest.
Thiem then grabbed a 4-3 lead in the third which he stretched to 5-3 but then it was his turn to crack as Nadal raced away with three games to claim a two sets to one lead.
Thiem was 4-2 ahead in the fourth set before he was again reeled in and he was two points from defeat in the 12th game.
But he took the tiebreaker before Nadal just proved the steadier of the two in the final set decider.
Del Potro reached the semi-finals for the third time, defeating John Isner 6-7, 6-3, 7-6, 6-2 and ending American hopes of a first men's champion at the event since 2003.
Del Potro dropped his first set of the tournament against 11th seed Isner, who was playing in his maiden quarter-final at his home slam.
Despite that, the 29-year-old Argentine was never broken in the three-hour-31-minute match where Isner unleashed 26 aces but was undone by 52 unforced errors compared to Del Potro's 14.
Wednesday's quarter-finals will see two-time champion Novak Djokovic face Millman, the world No 55.
Marin Cilic will face Kei Nishikori in a repeat of the 2014 final won by the giant Croat.