The six-time champion battled back from 8-4 down in the final-set super tie break — which goes up to 10 as opposed to seven — to triumph 4-6 7-6 6-4 4-6 7-6 (10-8) in four hours and three minutes.

At times, Federer had no answer to Millman’s thundering serve and piercing groundstrokes, but he saved some of his best tennis for the closing moments, winning six straight points to steal a victory from the brink of defeat.

Millman’s grimace and a shake of the head as the pair walked to embrace each other told the whole story.

For Federer, however, the victory marked another historic milestone and makes him the first man to achieve 100 wins at the Australian Open.

READ: Serena Williams stunned by Qiang Wang at the Australian Open
READ: Coco Gauff stuns defending champion Naomi Osaka to reach Australian Open fourth round

“Oh God, that was tough, thank God it’s a super tiebreaker otherwise I would have lost,” the 20-time grand s;am champion told interviewer Jim Courier with an audible sigh of relief.

“Where to start? I think John played a great match. He’s a great fighter, a good guy. It came down to the wire. I had a bit of luck, maybe. I had to stay so focused and take the right decisions.

“He was coming up with the goods, and I was getting ready to explain myself in the press conference. The demons are always there, they’re lurking.”

Those demons were likely the lingering memory of the four-set beating that Millman gave Federer at the 2018 US Open, and to date the world No. 47’s only victory against a top-10 opponent.

The Aussie seems to thrive when faced with by the far more illustrious Swiss — who hit an uncharacteristically high 82 unforced errors — but tonight Federer was finally able to banish those memories of 18 months ago.

Federer, who wrapped up victory after 1am, will face Hungary’s world No. 67 Marton Fucsovics in the fourth round as he chases a sixth Australian Open title and first since 2018.