MELBOURNE, Australia -- Canada's Milos Raonic advanced to the third round of the Australian Open with a marathon four-set win over Switzerland's Stan Wawrinka on Thursday.

Raonic was either one or two points from dropping each of the sets he eventually grabbed on the way to edging Wawrinka 6-7 (4), 7-6 (6), 7-6 (11), 7-6 (5).

The 16th-seeded Raonic, from Thornhill, Ont., hit 39 aces in the four-hour, two-minute thriller that was also delayed by rain.

"It feels like four hours passed by in about 15 minutes. ... The adrenaline takes over," said Raonic, the runner-up at Wimbledon in 2016. "I was very fortunate to stay alive in that fourth set."

Wawrinka, owner of a total of three Grand Slam titles including the 2014 Aussie Open title, was two points away from taking the second set, held three set points in the third, and was two points away from forcing a fifth while ahead 5-4 in what would turn out to be the last tiebreaker.

Raonic will meet France's Pierre-Hugues Herbert on Saturday in the third round.

Denis Shapovalov of Richmond Hill, Ont., defeated Japan's Taro Daniel 6-3, 7-6 (2), 6-3 later Thursday.

Earlier, Bianca Andreescu dropped her second-round match 6-3, 3-6, 6-2 to Anastasija Sevastova of Latvia.

The loss halted a solid start to the 2019 tennis season for the 18-year-old from Mississauga, Ont., who was coming off her first final appearance at a WTA tournament two weeks ago.

Andreescu looked rejuvenated after a brief rain delay in the second set against Sevastova, coming back to break her opponent to go up 5-3 then holding serve.

Andreescu started strong with a break in the third set, but the 28-year-old Sevastova recovered with three breaks of her own for the match.

Andreescu had 49 unforced errors to Sevastova's 33 throughout the match, which lasted two hours 14 minutes.

Sevastova, the 13th seed at the tournament, converted on 5-of-15 break points. Andreescu was 3-for-11 on break points won.

Eugenie Bouchard of Westmount, Que., was set to challenge American superstar and 23-time Grand Slam champion Serena Williams.

Andreescu went through three qualifying rounds to earn a spot in the main draw of the Australian Open a week after reaching the final at the ASB Classic in New Zealand, where she upset former World No. 1s Caroline Wozniacki and Venus Williams before losing to No. 14 Julia Goerges in the championship match in Auckland.

The stellar run saw Andreescu rise 45 spots in the WTA standings to sit at a career-high No. 107 entering the Australian Open. She is projected to move up to No. 88 when the new WTA rankings are released.

Andreescu won her first career main-draw match at a Grand Slam tournament on Tuesday, edging 16-year-old Whitney Osuigwe of the United States in three sets.

-- With files from The Associated Press