Six-time champion Roger Federer survived a huge scare to beat unseeded Australian John Millman 10-8 in a final-set tie-break and reach the Australian Open fourth round.
The Swiss world number three won 4-6 7-6 (7-2) 6-4 4-6 7-6 (10-8) in an epic that lasted four hours three minutes.
Federer, 38, trailed 8-4 in the deciding tie-break - but won six points in a row to progress.
He will face Hungary's Marton Fucsovics in the fourth round.
Federer looked emotionally and physically drained after a contest which he eventually clinched at 00:50 local time in Melbourne.
Even his wife Mirka, who has witnessed plenty of emotional rollercoasters during her husband's illustrious career, could barely watch as high-pressure moments came and went in a pulsating encounter.
Like the 15,000 people watching on Rod Laver Arena, and millions around the world, her face became contorted with strain as the match looked to be slipping out of Federer's grasp.
The 20-time Grand Slam winner stared at defeat when he trailed 8-4 in the first-to-10 super tie-break which decides matches at the Australian Open.
But he dug in to seal an extraordinary win to cap a remarkable day five at the opening major of the year.
The win keeps alive Federer's hopes of extending is record total of 20 major titles - with Rafael Nadal chasing on 19 and Novak Djokovic close behind both of them on 16.
Millman pushes Federer to the limit... again
Millman earned the best win of his career when he beat the flustered Federer in the 2018 US Open fourth round, in a match that will live long in the memory.
This match surpassed even that in terms of intensity and drama.
Millman pushed Federer to the limit on that humid night in New York and managed to do the same in Melbourne, in much cooler temperatures which did not sap the 38-year-old of his physical strength this time.
Federer could never put clear daylight between himself and an opponent who refused to back down - with Millman winning the first set and losing the next two before recovering to take the fourth.
"He's just so tough from the baseline," Federer said.
"He's got good speed on the backhand and on the forehand. The way he hits makes me unsure if I should pull the trigger or I shouldn't.
"I was not returning poorly. I was just not getting into those neutral rallies, finding the ways to unlock him. That's his credit. He's a great player."
The Rod Laver Arena crowd usually gets fully behind Federer - but not this time, with the 15,000 fans in the stands split between the Swiss great and the Australian number three.
That division will unite almost wholly back in favour of Federer when he faces Hungary's world number 67 Fucsovics on Sunday, where his biggest problem might be how he quickly recovers - mentally and physically - from this bruising battle.
'If you understand tennis you will know' - Millman not beating himself up about loss
Millman, a charismatic 30-year-old from Queensland, always seems to enjoy his moments in the spotlight, unsurprising after a long route to the big time following serious shoulder and groin injuries which left him close to quitting.
The Australian thrives against Federer, who was powerless to stop some unnerving winners - typified by two crackerjacks in the match tie-break - and could not cope with his second serve.
But only a second victory against a top-10 player in 16 attempts - the other also against Federer - was snatched from his grasp.
"What a match. John deserves half of this. He made it so difficult for me," said Federer.
"He deserves all the support, he is a great story and a great fighter."
Millman looked emotionally drained as he spoke to the media less than half an hour after the match ended, disappointed with the manner of his defeat but content he had "left it all out there".
"Roger made it tough, that's what all the best players do," he said.
"If you're engaged in 10, 20-ball exchanges, you ticked a few boxes. It is not as if it was double faults or first ball errors.
"I will cop it about that [letting the 8-4 lead slip] but if you understand tennis, you will know there was not a whole lot wrong. But it still hurts. I'd rather lose 10-5 or something."