Novak Djokovic came through his first major test at the Australian Open against American powerhouse Frances Tiafoe.
The world number one, bidding for an unprecedented ninth Melbourne title, had dropped only six games as he flattened Jeremy Chardy in round one.
But a fired-up Tiafoe proved a tougher proposition, taking a second-set tie-break and going toe-to-toe with Djokovic in the third, before the Serbian battled through 6-3 6-7 (3) 7-6 (2) 6-3.
Djokovic had two points for 4-0 in the third but, seemingly struggling with the soaring temperature, he allowed Tiafoe to draw level. Tiafoe saved two set points at 4-5, but with the 23-year-old from Maryland now also feeling the heat Djokovic pulled out a near-perfect tie-break.
Some lung-busting rallies in the fourth left both players gasping for breath and it was Tiafoe who lost his way down the finishing straight.
A time violation ultimately cost him his serve to trail 4-3 and a double-fault on match point gave Djokovic victory in three-and-a-half hours.
“It was a very tough match, it was very warm with the sun on the court and a lot of long rallies,” Djokovic, who fired down 26 aces, said on court afterwards.
“I want to give Frances a hand for a great match. If I had to choose I wouldn’t like to have these matches early in the week, but the matches are only going to get tougher.
“I know how to handle these circumstances, but I was lucky to get through the third set, it was anyone’s game. It was high-quality tennis.”
Former champion Stan Wawrinka missed three match points in a dramatic five-set loss to Hungary's Marton Fucsovics.
The 2014 winner, seeded 17, was two sets down but fought back to level and then broke back when Fucsovics served for the match in the decider.
He looked set to complete the comeback when he led 9-6 in the first-to-10 points deciding tie-break, only for Fucsovics to reel off five in a row to prevail 7-5 6-1 4-6 2-6 7-6 (9).
US Open champion Dominic Thiem brushed aside Germany's Dominik Koepfer 6-4 6-0 6-2 and eighth seed Diego Schwartzman dropped only five games in beating lucky loser Alexandre Muller.
Denis Shapovalov, the 11th seed, beat Australia's Bernard Tomic 6-1 6-3 6-2 to set up an enticing clash with fellow Canadian Felix Auger-Aliassime.
MEN’S SINGLES 2ND RD RESULTS
(1) Novak Djokovic (Ser) bt Frances Tiafoe (USA) 6-3 6-7 (3-7) 7-6 (7-2) 6-3, (27) Taylor Harry Fritz (USA) bt Reilly Opelka (USA) 4-6 7-6 (8-6) 6-7 (4-7) 7-6 (7-5) 6-2, Marton Fucsovics (Hun) bt (17) Stan Wawrinka (Swi) 7-5 6-1 4-6 2-6 7-6 (11-9), (14) Milos Raonic (Can) bt Corentin Moutet (Fra) 6-7 (1-7) 6-1 6-1 6-4, Pedro Martinez Portero (Esp) bt Emil Ruusuvuori (Fin) 1-6 6-3 6-2 7-6 (7-5), (23) Dusan Lajovic (Ser) bt Alexander Bublik (Kaz) 6-4 7-6 (7-4) 4-6 6-3, (32) Adrian Mannarino (Fra) bt Miomir Kecmanovic (Ser) 6-1 6-2 6-4, (6) Alexander Zverev (Ger) bt Maxime Cressy (USA) 7-5 6-4 6-3, (3) Dominic Thiem (Aut) bt Dominik Koepfer (Ger) 6-4 6-0 6-2, Nick Kyrgios (Aus) bt (29) Ugo Humbert (Fra) 5-7 6-4 3-6 7-6 (7-2) 6-4, (18) Grigor Dimitrov (Bul) bt Alex Bolt (Aus) 7-6 (7-1) 6-1 6-2, (15) Pablo Carreno-Busta (Esp) bt Jiri Vesely (Cze) 6-3 7-6 (7-3) 2-6 6-4, (11) Denis Shapovalov (Can) bt Bernard Tomic (Aus) 6-1 6-3 6-2, (20) Felix Auger-Aliassime (Can) bt James Duckworth (Aus) 6-4 6-1 6-2, Aslan Karatsev (Rus) bt Egor Gerasimov (Blr) 6-0 6-1 6-0, (8) Diego Sebastian Schwartzman (Arg) bt Alexandre Muller (Fra) 6-2 6-0 6-3.