Grigor Dimitrov has survived an almighty scare from World No.186 MacKenzie McDonald, who received an incredible standing ovation for his efforts.
World No.3 Dimitrov battled past the unheralded young American qualifier 4-6 6-4 6-2 0-6 8-6 in an epic encounter that finished at almost midnight on Wednesday.
'NEVER SEEN THAT': Kyrgios overcomes bizarre distractions to advance
MORE HISTORY: Karlovic enters history books in another five-set epic
McDonald had never even won a tour match until Monday, but threatened to pull off the upset of the tournament after delivering the Bulgarian third seed a fourth-set bagel.
He looked to be on track for one of the biggest upsets in recent times, before being broken at 6-7 in the deciding set.
McDonald clearly won over the crowd with his gutsy efforts, receiving a spine-tingling standing ovation as he made his way off court.
"He was playing unbelievable, he deserves a lot of credit," Dimitrov said after the match.
"He played an unbelievable game, he's on the up and improving."
Elsewhere on Wednesday, Jo-Wilfried Tsonga came from behind to defeat Canadian rising star Denis Shapovalov as 38-year-old Ivo Karlovic struck another blow for the senior brigade at the Australian Open.
Crowd favourite Tsonga advanced to the third round at Melbourne Park for a 10th time, France's 2008 finalist defeating Shapovalov 3-6 6-3 1-6 7-6 (7-4) 7-5.
Karlovic later became the oldest man to reach the round of 32 at the Australian Open in 40 years when he triumphed over Japan's Yuichi Sugita in the longest match of the tournament so far.
The 211cm Croatian battled his way to a 7-6 (7-3) 6-7 (3-7) 7-5 4-6 12-10 victory in four-and-a-half hours.
World No.1 Rafael Nadal, meanwhile, continued his quest for a 17th grand slam title, defeating Argentina's Leonardo Mayer in straight sets.
The Spaniard looked untroubled by his recent knee issues as he booked a third-round meeting with Bosnian No.28 seed Damir Dzumhur with a 6-3 6-4 7-6 (7-4) victory.
Sixth seed Marin Cilic also advanced with a 6-1 7-5 6-2 win over Portugal's Joao Sousa.