Roger Federer produced a dramatic late comeback in a fifth-set tie-break to survive a huge scare from John Millman and progress to the fourth round of the Australian Open.
Day five had already seen Serena Williams, Naomi Osaka and Stefanos Tsitsipas dealt shock defeats, and there looked to be another in store as Millman surged into an 8-4 lead in the final-set tie-break having been two sets to one down.
Recent history was also on the side of Millman, who defeated Federer in the 2018 US Open, while the 20-time grand slam champion went into Friday's encounter having lost his previous three five-set matches.
However, Federer somehow reeled off six successive points, a stunning forehand pass securing a 4-6 7-6 (7-2) 6-4 4-6 7-6 (10-8) win that marked his 100th at Melbourne Park and booked a last-16 clash with Marton Fucsovics.
The first set the tone for an uncharacteristically error-strewn performance from Federer.
He committed 14 unforced errors in the opener, and a double fault followed by a wayward forehand gifted Millman the early lead.
Millman faced the only break point of the second, but it was vintage Federer in the subsequent tie-break, the Swiss masterful in equal measure at the baseline and the net as he raced into a decisive 6-1 lead.
The third followed a markedly similar pattern with Federer finding no way through the Millman resistance. That was until the 10th game, when the Queenslander's composure cracked and he pushed long to seemingly give Federer control of the match.
But even as the errors crept into his game, Millman displayed a remarkable ability to trade blows with Federer in the longer exchanges and he brought up break point with a superb return before winning a tremendous rally that ended with the Swiss sending a forehand into the net.
Federer was 30-0 ahead in the subsequent game, only for four successive errors to allow Millman to hold, with a love hold then sending an absorbing contest to a fifth.
Another unforced error gave Millman the initiative in the decider and, though he gave the break back and squandered a pair of break points at 3-3, the home hope appeared on course to repeat his 2018 achievement in the tie-break.
Indeed, it was Millman who seemed to have the most left in the tank, and an astonishing cross-court pass put him within two points of victory.
Federer, though, is still capable of defying the odds at the age of 38, and he delivered a reminder that he should never be counted out with an emphatic response that capped an epic of four hours and three minutes in fitting fashion, his forehand passing shot making the most of an indecisive Millman stroke.
Roger Federer  bt John Millman 4-6 7-6 (7-2) 6-4 4-6 7-6 (10-8)
Federer – 62/82
Millman – 40/48
Federer – 16/6
Millman – 11/4
BREAK POINTS WON
Federer – 3/10
Millman – 4/8
FIRST SERVE PERCENTAGE
Federer – 65
Millman – 62
PERCENTAGE OF POINTS WON ON FIRST/SECOND SERVE
Federer – 77/51
Millman – 68/61
Federer – 181
Millman – 178