BRISBANE, Australia -- Roger Federer survived a close call in his first match of the season, needing three sets Thursday to reach the Brisbane International quarterfinals.

The 17-time Grand Slam winner held off Australian wild-card entry John Millman 4-6, 6-4, 6-3.

"I'm sweating like crazy," Federer said.

The weather was reasonably mild for sub-tropical Brisbane, where Federer lost in the final last year. It was the hot reception from the No. 153-ranked Millman that troubled him for a while.

Federer, who had a first-round bye and delayed his opening match until Day 5 of the tournament, made an uncharacteristic 19 unforced errors in the first set and finished with 38 for the match.

Third-seeded Milos Raonic had 17 aces and didn't face a break point in a 6-3, 6-4 win over Mikhail Kukushkin of Kazakhstan to set up a quarterfinal match against Sam Groth of Australia, who beat Lukasz Kubot of Poland 6-4, 6-7 (2), 7-6, (3). Australian wild-card entry James Duckworth advanced with a 4-6, 7-6 (5), 6-3 win over Jarkko Nieminen and will meet Federer in the next round.

"I served well. Finished last year and we definitely thought I could do a lot better with my serve, so we spent a lot of time this off season on that and I'm happy that it's going well," Raonic said.

The 24-year-old Canadian said he's coming off his best off-season ever, and is ready to make his breakthrough at the Grand Slam events.

"That's the biggest goal I've set for myself, is to do much better in specifically one major," said Raonic, who reached the Wimbledon semifinals and French Open quarterfinals last year. "I've been in a semifinal now, but I can do much better."

On the women's side, Maria Sharapova moved into the semifinals with a 6-1, 6-3 win over Carla Suarez Navarro, weathering a challenging opening few games before taking the momentum away from her Spanish rival.

The top-seeded Sharapova dropped her opening service game and then needed eight break points before converting for a 2-1 lead. From there, it was straight-forward progress.

"I lost to her last year. We went back and forth with our victories in 2014, so I'm always a little bit aware of girls that I lose to," Sharapova said. "Maybe made a little bit too many unforced errors in the beginning, but then got a good rhythm and finished strong."

Sharapova has dropped only five games in her opening two matches of the season and next faces Elina Svitolina of Ukraine, who came from a set and a break down to beat third-seeded Angelique Kerber of Germany 4-6, 7-5, 6-3.

Second-seeded Ana Ivanovic struggled early in her 4-6, 6-4, 6-3 win over Kaia Kanepi of Estonia, losing the first five games before settling into the match.

There were seven breaks of serve in the second set before Kanepi double-faulted on set point -- one of her 10 double-faults in the match.

"I'm really happy to keep my composure," Ivanovic said. "This is a great test, not only physically but mentally."

Ivanovic's semifinal match will be against Varvara Lepchenko of the United States, who had a 7-5, 7-5 win over Alla Kudryavtseva of Russia.