Melbourne - Roger Federer didn't have things all his own way as he got past spirited American qualifier Noah Rubin to reach the Australian Open third round in a tough three-setter on Wednesday.
The 17-time Grand Slam champion, seeded 17, fought back from a break down in the final set to win 7-5, 6-3, 7-6 (7/3) and will next face long-time rival Tomas Berdych.
Federer, 35, had his service broken for the first time in the final set and the 200th-ranked Rubin was serving to take it into a fourth set before the Swiss legend clawed back to force a tiebreaker.
His match-big experience and composure was enough to pull him through and take the match in 2 hours and 4 minutes on Rod Laver Arena.
"I have played out here many, many times, that's my advantage maybe," Federer said of his first meeting with the 20-year-old American, a Wimbledon junior champion three years ago.
"I did see a bit of Noah going into this match. He's been around for a couple of years now.
"It's great to get to see a few matches now. Yeah, plays well. Great fighter. Great legs. Aggressive on the ball.
"My serving kept me in the match today and happy I got through somehow."
It was Federer's second win against a qualifier at this year's Open after he defeated experienced Austrian Jurgen Melzer in four sets on Monday.
Federer is coming off an injury-hit 2016 following knee surgery which forced him to miss the Rio Olympic Games.
The Swiss great also dropped out of the world's top 10 for the first time in more than 14 years in November, and did not qualify for the ATP World Tour Finals for the first time since 2001.
Results from the Australian Open on Wednesday (x denotes seeding):
Malek Jaziri (TUN) bt Alexander Bublik (KAZ) 6-2, 6-3, 7-5
Lukas Lacko (SVK) bt Dudi Sela (ISR) 2-6, 6-3, 6-2, 6-4
Kei Nishikori (JPN x5) bt Jeremy Chardy (FRA) 6-3, 6-4, 6-3
Jo-Wilfried Tsonga (FRA x12) bt Dusan Lajovic (SRB) 6-2, 6-2, 6-3
Tomas Berdych (CZE x10) bt Ryan Harrison (USA) 6-3, 7-6 (8/6), 6-2
Roger Federer (SUI x17) bt Noah Rubin (USA) 7-5, 6-3, 7-6 (7/3)
Stan Wawrinka (SUI x4) bt Steve Johnson (USA) 6-3, 6-4, 6-4
Angelique Kerber (GER x1) bt Carina Witthoeft (GER) 6-2, 6-7 (3/7), 6-2
Kristyna Pliskova (CZE) bt Irina Begu (ROM x27) 6-4, 7-6 (10/8)
Alison Riske (USA) bt Zhang Shuai (CHN x20) 7-6 (9/7), 4-6, 6-1
Duan Yingying (CHN) bt Varvara Lepchenko (USA) 6-1, 3-6, 10-8
Venus Williams (USA x13) bt Stefanie Voegele (SUI) 6-3, 6-2
Elina Svitolina (UKR x11) bt Julia Boserup (USA) 6-4, 6-1
Anastasia Pavlyuchenkova (RUS x24) bt Natalia Vikhlyantseva (RUS) 6-2, 6-2
Jelena Jankovic (SRB) bt Julia Goerges (GER) 6-3, 6-4
Svetlana Kuznetsova (RUS x8) bt Jaimee Fourlis (AUS) 6-2, 6-1
Eugenie Bouchard (CAN) bt Peng Shuai (CHN) 7-6 (7/5), 6-2