Roger Federer defied age and logic once again to save seven match points before beating unseeded American Tennys Sandgren in a sensational Australian Open quarter-final.
The out-of-sorts Swiss fought off form and fitness concerns before winning 6-3 2-6 2-6 7-6 (10-8) 6-3.
World number 100 Sandgren looked set to be the lowest-ranked player to reach the Melbourne semi-finals since 1991.
But third seed Federer battled to win in three hours and 28 minutes.
The 20-time Grand Slam champion, who had a medical timeout in the third set for a groin problem, will play Serbia's defending champion Novak Djokovic or Canadian 32nd seed Milos Raonic in the last four.
Federer calmly raised his racquet in the air, taking the acclaim of a buzzing crowd on Rod Laver Arena, after Sandgren dumped a forehand into the net on the Swiss' first match point.
The fatigued pair shook hands at the net, Sandgren wishing his rival luck before trudging off to a standing ovation from the 15,000 fans barely able to believe what they had seen.
"You've got to get lucky sometimes I tell you that," Federer said. "Sometimes you're not under control.
"I just hoped he wouldn't smash a winner, just keep the ball in play and if he does miss one of two then see what is going through his mind.
"As the match went on I felt better and the pressure went away.
"I didn't deserve this one but I'm standing here and I'm obviously very happy."