MELBOURNE, Australia -- Roger Federer was not going to go gently, of course, no matter how daunting the number of match points (his opponent accumulated seven), no matter how achy his 38-year-old legs, no matter how slow his serves and no matter how off-target his groundstrokes.
Federer still plays for the love of these stages and circumstances. He still yearns for more trophies, too. Down to his very last gasp, time and again, against someone a decade younger, 100th-ranked Tennys Sandgren of the United States, Federer somehow pulled off a memorable comeback to reach the Australian Open semifinals for the 15th time.
Despite all sorts of signs that he was not quite himself for much of the match, Federer beat the hard-hitting, court-covering Sandgren 6-3, 2-6, 2-6, 7-6 (8), 6-3 on Tuesday in a rollicking quarterfinal that appeared to be over long before it was.
"For the most time there, I thought that was it. Of course, there's little sparkles where maybe not. Then you're like, 'No, it is over," said Federer, who only once before had won after facing as many as seven match points, equaling his personal best from all the way back in 2003. "Only maybe when I won that fourth set did I really think that, maybe, this whole thing could turn around."
He said afterward that it had been his groin muscle that was the problem and he couldn't be certain whether he would be fully recovered for his next match, which will come against defending champion Novak Djokovic.
Djokovic moved to within two wins of an eighth Australian Open title with a 6-4, 6-3, 7-6 (1) victory over 2016 Wimbledon finalist Milos Raonic and is now 10-0 during his career against the big-serving Canadian.
It will be the 50th meeting between No. 3 seed Federer, who has 20 Grand Slam titles, and No. 2 Djokovic, who owns 16.
Djokovic leads head-to-head 26-23.
"Tremendous respect for Roger, everything he has achieved in this sport," Djokovic said, then joked about Federer's escape against Sandgren, saying: "hope I get to at least one match point."
The last two men's quarterfinals are Wednesday: Rafael Nadal vs. Dominic Thiem, and Alexander Zverev vs. Stan Wawrinka.
Federer vs. Sandgren was as dramatic as can be.
"You can't give a good player -- let alone maybe the best player ever -- that many chances to come back," said Sandgren, his voice low, his eyes looking down. "They're going to find their game and start playing well. That seemed to me what happened."
Federer was involved in a dispute with the chair umpire over cursing. He left the court for a medical timeout early in the third set, then was visited by a trainer later for a right leg massage.
Sandgren was run into by a ball kid during the changeover at 3-all in the tiebreaker, which he said was "physically painful" to his right calf but "wasn't a big deal." He was distracted by hearing the work of a courtside broadcast commentator. There also was an odd buzz emanating from the chair umpire's microphone.
Above all, there were all of those match points for Sandgren, a 28-year-old from Tennessee who's never been a major semifinalist and was trying to become the lowest-ranked man in the Australian Open's final four since Patrick McEnroe was at No. 114 in 1991.
Imagine, then, the heartbreak for Sandgren, who toiled for years on lower-level tours and was so thrilled just to share the stage with Federer for the first time.
"Back to the drawing board. Keep working. Keep trying to improve. Maybe I'll get another look, another shot," Sandgren said. "Maybe I'll come through."
After rolling through the second and third sets as Federer's serve dropped from an average of 112 mph to 105 mph -- "Wasn't popping like it does normally," Sandgren observed -- and Federer's unforced errors totaled 30, the underdog led 5-4 in the fourth set.
That's when Sandgren earned his first trio of opportunities to end things and complete a career-defining victory. On one, Sandgren dumped a backhand into the net. On the next, he pushed a forehand wide. On the third, another forehand found the net.
Then came four more match points in the tiebreaker. But Sandgren failed to close the deal at 6-3 ... or at 6-4 ... or at 6-5 ... or at 7-6.
"Honestly, when they told me seven, I was like, 'What?!' I thought it was three," Federer said. "It's such a blur."
On Federer's own second chance to take that set and force a fifth, Sandgren hit a ball that landed near the baseline. Federer thought it might be out -- he turned to look at a line judge for a call that never came -- yet barely flicked it back in a defensive manner, and Sandgren's overhead smash went long.
Federer wagged his right index finger overhead -- the universal sign for "I'm No. 1!" -- and was on the right path. He ended the victory with a service winner at 119 mph, a little more than an hour after first staring down defeat.
"Just seemed like his level picked up when his back was right up against the wall," said Sandgren, who only got the chance to serve on one of those seven pivotal points. "He just wouldn't give me anything. Credit to him, for sure."
Federer has won six titles at Melbourne Park and never lost there to anyone ranked worse than 54th. But Sandgren, whose career tour-level record is under .500, played superbly. He won more points than Federer, 161-160. He produced edges of 27-5 in aces, 73-44 in total winners.
Other than the first set and the fifth, Federer's footwork was hardly perfect, the lower-body push he normally gets to add oomph to forehands and serves nonexistent.
At the US Open last September, it was Federer's upper back and neck that bothered him in a five-set quarterfinal loss to Grigor Dimitrov, who was ranked 78th at the time.
In this tournament, the No. 3-seeded Federer still hasn't played anyone ranked better than No. 41 Filip Krajinovic, whom he beat in the second round. Federer was pushed to the brink in the third round by No. 47 John Millman, two points from defeat before coming back to claim a fifth-set tiebreaker. And in the fourth round, Federer dropped the opening set to No. 67 Marton Fucsovics.
On Tuesday, Federer knew exactly the sort of pain Sandgren experienced. As recently as last July, Federer failed to convert a pair of championship points in the fifth set of the Wimbledon final before losing to Djokovic.
"These ones just sting, and they hurt. ... If you could, obviously, play them again, would you play them differently?" Federer said. "But I could have blinked at the wrong time and shanked. That would have been it. I was incredibly lucky today."
For Djokovic, about the only thing that slowed his progression to a 37th career Grand Slam semifinal was the medical timeout the Serb asked for at 4-all in the third set so he could put in new contact lenses.
Djokovic later complained about his eyes and was visited a couple of other times by a trainer and doctor.
"It was just something I had to do," Djokovic said, "because those few games, I really couldn't see much."