MIAMI GARDENS, Fla. -- Ashleigh Barty waited six hours to get her spot in the Miami Open women's final. Denis Shapovalov needed to pull off yet another comeback to earn his berth into the semifinals.

Roger Federer, meanwhile, made winning seem relatively easy.

And Simona Halep's chance to return to No. 1 in the world fell apart against Karolina Pliskova.

Federer is back in the Miami semifinals, the No. 4 seed winning the first eight games of his match and eventually ousting sixth-seeded Kevin Anderson 6-0, 6-4 as part of a very long, very soggy Thursday night at Hard Rock Stadium. He won a marathon ninth game of the final set to break Anderson for a 5-4 lead, then served it out at love.

"I got a bit lucky there at the end," Federer said. "But it was a great fight by Kevin, and of course I enjoyed the match."

Anderson hadn't lost a set 6-0 since October 2016 -- 353 sets ago. He rallied from a break down to get back on serve in the second, before Federer took control at the end.

"They just don't happen often enough,'' Federer said of that 6-0 first set. "I think I played a really, solid, nice first set with very few mistakes.''

Mistakes doomed Halep, who lost to fifth-seeded Pliskova 7-5, 6-1. Pliskova was up 5-0 in the second set when play was interrupted -- for at least the sixth time Thursday -- by rain shortly before midnight. Halep, the No. 2 seed, would have replaced Naomi Osaka as the top-ranked women's player if she won the semifinal.

She led 5-3 in the opening set and just unraveled. Pliskova won nine consecutive games before the skies opened during a changeover. After waiting about an hour for the rain to stop and the court to be dried, she needed only four more minutes of play and finished out the match at 1:11 a.m. -- or 6:11 a.m. Friday in her native Czech Republic; 7:11 a.m. Friday in Halep's native Romania.

So the day's winners were Federer, Shapovalov, Barty, Pliskova and the rain.

"We can't control the weather," Barty said.

Barty walked away from tennis about five years ago, saying she was basically burned out at 17. She returned three years ago. And now at 22, she's better than ever.

The 12th-seeded Barty endured three rain delays on Thursday before ousting 21st-seeded Anett Kontaveit 6-3, 6-3 in the first women's semifinal. Next up is the biggest final of her singles career, against Pliskova.

"Obviously, I've been doing the right things throughout the week to put be able to put myself in a position to play for a title," Barty said. "You have to go out there and embrace it."

Barty, who will rise to a career-best No. 9 in the world ranking next week, was to take the court for the semifinal against Kontaveit at 1 p.m. Rain pushed their start time back to 2:08, and the delays were just getting started.

They got three games -- six minutes of tennis -- in before the first in-match delay stopped things for more than two hours. They got another game in before more rain arrived, prompting another two-hour delay.

At 7:32 p.m., Barty could celebrate. Kontaveit fended off one match point with a forehand drop shot, but was ousted by an ace on the following point. Barty was down 3-1 in the second, but won the final five games.

"Very long day,'' said Barty, who passed the time in the locker room by drinking coffee and watching golf. "But for me, it's an opportunity to come out and play another match."

Federer is 37 years old. That's the combined age of the two Canadian teens in the men's semifinals -- Shapovalov, 19, will face Federer on Friday night, and the 18-year-old Felix Auger-Aliassime will meet defending Miami champion John Isner of the U.S. earlier Friday.

"It's great for the game because they will carry the sport when we're long gone and we'll be sitting on the couch watching those guys slug it out," Federer said about the young Canadians. "It'll be a joy to watch because not only are they great, great players but they're good people, too.''

Shapovalov reached the semifinals by beating 28th-seeded Frances Tiafoe 6-7 (5), 6-4, 6-2 -- the third time in four matches at this tournament that he rallied from a set down before prevailing. And the success for Auger-Aliassime and Shapovalov in Miami follows the story of 18-year-old Canadian Bianca Andreescu winning the title at Indian Wells earlier this month.

O, Canada, indeed.

"Pretty crazy. Everyone is super excited back home," said Auger-Aliassime, who wasn't in the top 100 of the world rankings two months ago and now will climb to No. 33 next week -- if not higher. "It's great to hear all these good comments from them. It puts a lot of belief in tennis in Canada. I think all the Canadian players from the young kids to Denis and Bianca and I, there is a lot of belief right now, so it's great to see."