Swiss great Roger Federer said "I believe in miracles" after he saved seven match points in a five-set nail-biter against 100th-ranked Tennys Sandgren to go into an Australian Open semi-final with Novak Djokovic on Tuesday.
The six-time champion, struggling physically, saved three match points at 4-5 in the fourth set and four more in the tie-breaker to scrape through 6-3, 2-6, 2-6, 7-6 (10/8), 6-3.
Federer, 38, now goes into an unmissable semi-final with Djokovic, who blunted Milos Raonic's razor serve to win 6-4, 6-3, 7-6 (7/1) and move two wins from an eighth Melbourne title.
Djokovic, despite trouble with his contact lenses, ended Raonic's run of 63 straight games in the tournament without a break of serve and moves smoothly into the semis for the loss of just one set so far.
He paid tribute to the great escape by Federer, ahead of a semi-final that reprises his epic win over the Swiss in last year's Wimbledon decider.
"What he did today was really amazing, to come back and save seven match points at his age," Djokovic said.
"He's still playing such a great tennis and proving that he deserves to be up there. He's a great fighter. Obviously I have lots of respect for him."
Federer's match was incident-packed and he received a rare warning for an audible obscenity before going off-court for treatment on a groin injury.
Still hampered by the injury, he somehow forced a fifth set and began to regain control against the big-serving American.
"I believe in miracles," Federer said, revealing that he thought his groin strain had ended his chances. "There could be rain, there could be all kinds of stuff.
"(I thought) just let him finish me off in style, and he didn't do that. I'm incredibly lucky tonight, today -- I don't even know what time it is."
Sandgren, achingly close to becoming the lowest-ranked player to beat Federer at the Australian Open, can count himself unlucky especially after a ball girl accidentally collided with him during the pivotal tie-breaker, which he lost.
Federer has made heavy weather of reaching his 46th Major semi-final. He was two points from defeat by John Millman in a fifth-set tie-breaker in round three, and dropped a set against 67th-ranked Marton Fucsovics in round four.
In the women's draw Australia's world number one Ashleigh Barty dismissed two-time Wimbledon champion Petra Kvitova in impressive style to reach the semis for the first time.
The unflappable Barty beat the Czech 7-6 (8/6), 6-2 and will be favourite in her semi-final against America's Sofia Kenin -- sending hopes soaring of a first home winner in 42 years.
The French Open champion, who once quit tennis to play cricket and has been steadily rising since her return, is the tournament's poster girl with her image plastered all over Melbourne.
But she said: "I'd prefer to just be sitting at home just living my quiet little life."
Kenin, whose career is also on the up, made her first Grand Slam semi-final and with it will rise to at least 12 in the rankings -- making her the second-highest American behind Serena Williams.
The feisty 21-year-old was a 6-4, 6-4 winner over Ons Jabeur, halting the Tunisian's historic run which made her the first Arab woman to reach a Major quarter-final.
"She's a really tough player, I knew she's going to come out playing strong," Kenin said. "She's had really good matches, good wins. It wasn't an easy battle -- all respect to her."
Jabeur has ignited interest back home with her run to the last eight, even receiving a good-luck phone call from her president.
"I think I proved that I can be in the quarter-finals in a Grand Slam, even if I have a lot of things to improve physically and mentally," said the 25-year-old, who will now move inside the top 50.
"I proved to myself that I could do a lot of great things. I'm happy that I played this way."