Melbourne - Defending champion Roger Federer reached the Australian Open third round for a 20th straight year on Wednesday but was made to battle hard by Britain's Dan Evans before winning 7-6 (7/5), 7-6 (7/3), 6-3.
The ageless 20-time Grand Slam champion, who is gunning for a record seventh Melbourne Park title and third in a row, had breezed past Denis Istomin in the first round, but was given a much tougher examination by the world number 189.
"I think if I could have pulled away early in the match it might have been different," said the 37-year-old Swiss master who needed 2 hours and 35 minutes to get past his 28-year-old opponent.
Evans, whose ranking plummeted from a career-high 41 after he was slapped with a year-long ban for testing positive to cocaine in April 2017, played almost flawless tennis to stave off a set point on his way to forcing a first set tie-break.
He even had the temerity to lead 5-3 in the breaker before Federer stepped up a gear and reeled off the next four points with a cry of "come on!" as he secured a hard-fought opening set after exactly one hour.
It was harsh on Evans who had committed only two unforced errors and constantly put the third seed under pressure with his scampering, attacking game and flurry of winners off both wings.
The plucky Evans, who had covered acres of ground and found the lines brilliantly, needed treatment for blisters on both feet before the second set started and immediately was broken.
But he refused to lie down and broke back as Federer served for the set to force another tie-break.
"I thought I might have pulled away midway through the second set," added Federer. "But I couldn't, to his credit. He played well."
The Swiss star hasn't often needed luck during his unparallelled career but he took advantage of some in the third set to finally ease the pressure.
Holding break point at 2-1, he barely scooped up a half-volley which grabbed the net cord and toppled over forcing Evans to go long.
A service game to love followed to put Federer 4-1 up and the brave resistance of Evans was finally broken.
The veteran will next play American Taylor Fritz in the last 32.
Results from Day 3 of the Australian Open on Wednesday:
Stefanos Tsitsipas (GRE x14) bt Viktor Troicki (SRB) 6-3, 2-6, 6-2, 7-5
Nikoloz Basilashvili (GEO x19) bt Stefano Travaglia (ITA) 3-6, 6-3, 3-6, 6-4, 6-3
Tomas Berdych (CZE) bt Robin Haase (NED) 6-1, 6-3, 6-3
Andreas Seppi (ITA) bt Jordan Thompson (AUS) 6-3, 6-4, 6-4
Diego Schwartzman (ARG x18) bt Denis Kudla (USA) 6-4, 7-5, 3-6, 6-7 (6/8), 6-4
Marin Cilic (CRO x6) bt Mackenzie McDonald (USA) 7-5, 6-7 (9/11), 6-4, 6-4
Frances Tiafoe (USA) bt Kevin Anderson (RSA x5) 4-6, 6-4, 6-4, 7-5
Fernando Verdasco (ESP x26) bt Radu Albot (MDA) 6-1, 7-6 (7/2), 6-3
Karen Khachanov (RUS x10) bt Yoshihito Nishioka (JPN) 6-3, 6-3, 6-3
Roger Federer (SUI x3) bt Daniel Evans (GBR) 7-6 (7/5), 7-6 (7/3), 6-3
Taylor Fritz (USA) bt Gael Monfils (FRA x30) 6-3, 6-7 (8/10), 7-6 (8/6), 7-6 (7/5)
Roberto Bautista Agut (ESP x22) bt John Millman (AUS) 6-3, 6-1, 3-6, 6-7 (6/8), 6-4
Grigor Dimitrov (BUL x20) bt Pablo Cuevas (URU) 6-3, 6-7 (5/7), 6-3, 7-5
Thomas Fabbiano (ITA) bt Reilly Opelka (USA) 6-7 (15/17), 6-2, 6-4, 3-6, 7-6 (10/5)
Alex de Minaur (AUS x27) bt Henri Laaksonen (SUI) 6-4, 6-2, 6-7 (7/9), 4-6, 6-3
Rafael Nadal (ESP x2) bt Matthew Ebden (AUS) 6-3, 6-2, 6-2
Sloane Stephens (USA x5) bt Timea Babos (HUN) 6-3, 6-1
Petra Martic (CRO x31) bt Marketa Vondrousova (CZE) 6-4, 7-5
Aliaksandra Sasnovich (BLR) bt Anett Kontaveit (EST x20) 6-3, 6-3
Caroline Garcia (FRA x19) bt Zoe Hives (AUS) 6-3, 6-3
Ashleigh Barty (AUS x15) bt Wang Yafan (CHN) 6-2, 6-3
Anastasia Pavlyuchenkova (RUS) bt Kiki Bertens (NED x9) 3-6, 6-3, 6-3
Amanda Anisimova (USA) bt Lesya Tsurenko (UKR x24) 6-0, 6-2
Maria Sakkari (GRE) bt Astra Sharma (AUS) 6-1, 6-4
Danielle Collins (USA) bt Sachia Vickery (USA) 6-3, 7-5
Caroline Wozniacki (DEN x3) bt Johanna Larsson (SWE) 6-1, 6-3
Kimberly Birrell (AUS) bt Donna Vekic (CRO x29) 6-4, 4-6, 6-1
Petra Kvitova (CZE x8) bt Irina Begu (ROU) 6-1, 6-3
Belinda Bencic (SUI) bt Yulia Putintseva (KAZ) 7-5, 4-6, 6-2
Aryna Sabalenka (BLR x11) bt Katie Boulter (GBR) 6-3, 6-4
Angelique Kerber (GER x2) bt Beatriz Haddad Maia (BRA) 6-2, 6-3