Milos Raonic was either one or two points from dropping each of the sets he eventually grabbed on the way to edging 2014 champion Stan Wawrinka 6-7 (4), 7-6 (6), 7-6 (11), 7-6 (5) in the Australian Open's second round.
The 16th-seeded Raonic, the Wimbledon runner-up in 2016, hit 39 aces in the 4-hour, 2-minute thriller.
Wawrinka, owner of a total of three Grand Slam titles, was two points away from taking the second set and was two points away from forcing a fifth in what would turn out to be the last tiebreaker.
Mississauga's Bianca Andreescu lost her second-round match in three sets to Latvia's Anastasija Sevastova.