Serena Williams defeats No. 1-ranked Simona Halep 6-1, 4-6, 6-4 to reach the quarterfinals at the Australian Open. (1:20)

MELBOURNE, Australia -- Serena Williams faced her first real test at this year's Australian Open and emerged with a 6-1, 4-6, 6-4 victory over No. 1-ranked Simona Halep to reach the quarterfinals.

It was a back-and-forth match Monday night, filled with momentum swings and terrific play by both women.

Williams gained control for good after saving three break points in a monumental game to hold for 3-all in the third set. She then broke for a 4-3 lead and finally was on her way.

"It was a really intense match, and it was some incredible points,'' said Williams, who improved to 9-1 against Halep. "I love playing tennis and I love to play here and I love to be back out here.''

The 37-year-old American is trying to win her eighth singles championship at Melbourne Park and record-tying 24th Grand Slam trophy overall.

Until facing Halep, Williams had dropped a total of only nine games through three matches in the tournament. Not only did Halep exceed that total, she also snapped Williams' 21-set Australian Open winning streak.

That dated back to the start of Williams' run to the 2017 title, which she won while pregnant. She gave birth to a daughter in September 2017, then sat out last year's Australian Open.

"In order for me to stay out there, I had to play a little like I knew I could,'' said Williams, who is seeded 16th on account of all the time she took away from tennis while becoming a mother. "I'm such a fighter. I just never give up. It's definitely something that's innate. I just work so hard for every point.''

It wasn't until Williams saved three break points in a monumental game to hold for 3-all in the third set that she gained control.

"I was unlucky a little bit,'' Halep said.

Williams will next face Karolina Pliskova, who continued her successful start to 2019 to advance to the quarterfinals for the third consecutive year by beating former No. 1 Garbine Muguruza 6-3, 6-1 in a lopsided fourth-round match.

Pliskova made only three unforced errors during the 60-minute match in which she dominated Muguruza in their baseline duels.

It was the ninth straight win for Pliskova, who started the new year by winning the singles title at the Brisbane International before heading to Melbourne Park.

"I'm feeling great. I always feel good energy here," the 2016 US Open finalist said. "I feel like these conditions can be good for me."

Muguruza, who had the latest-starting match in Australian Open history when she went on court at 12:30 a.m. against Johanna Konta in the second round, had 20 unforced errors and dropped serve five times against Pliskova.

Also Monday, sixth-seeded Elina Svitolina fended off five break points in a game that went to deuce 11 times, contained 28 points, and was pivotal in a momentum-swinging 6-2, 1-6, 6-1 win over Madison Keys that earned her a place in the quarterfinals.

At her first opportunity in the next game, she broke the 17th-seeded Keys, the runner-up at the 2017 US Open and a semifinalist or better at three of the past five majors. It was all one-way from then on.

"I was happy I could handle the pressure at 1-1 in the third set,'' Svitolina said. "It was very hard because the sun was just burning my eyes when I was tossing the ball. Very happy I could win that game.''

Svitolina is trying to emulate what Caroline Wozniacki did here last year -- coming to the season-opening major as winner of the season-ending WTA Finals and winning a breakthrough major title.

She's 0-3 in Grand Slam quarterfinals to date, and next faces Naomi Osaka, who is into her second Grand Slam quarterfinal after another comeback win in Melbourne, this time over Anastasija Sevastova.

Apart from the second set, Keys didn't quite find her range with her ground strokes and 34 unforced errors.

She dropped her first two service games in the match, and she missed very narrowly on some crucial points and wasn't really able to break down Svitolina, particularly in that pivotal game, which lasted more than 15 minutes.

Both players reached the quarterfinals here last year, but Keys had more success at the majors in 2018, when she progressed to the semifinals at the French and US Opens.

Osaka had to work for nearly two hours on Rod Laver Arena to subdue the gritty Sevastova 4-6, 6-3, 6-4 in a fourth-round match studded by service breaks. Osaka won a tight three-setter when she met Sevastova at the Brisbane International in the first week of the season.

Sevastova grabbed the lead in the opening set Monday and clinched it with a deft drop shot that forced Osaka to fly a forehand over the baseline. Osaka had to stave off two break points in the third game of the second to edge ahead.

Osaka said she thought of how 20-year-old Stefanos Tsitsipas had stunned 20-time major winner Roger Federer and how Frances Tiafoe has advanced to the quarterfinals for the first time. This helped her pull herself together Monday to reach the last eight, too.

"I wasn't really sure what to do at a point. I just try to stick in there," Osaka said. "And also I was watching all these kids winning, like, last night Tsitsipas beat Federer and I was like, 'Whoa' -- so I decided I wanted to do well, too.

"I think that's everyone's dream," she added.

The fourth-seeded Osaka grew in confidence from the narrow escape and lifted her tempo and shot-making consistency, grabbing the crucial service break in the sixth game.

Serving to level the match, Osaka fended off a break-back point with a brilliant forehand volley after a long, tense baseline rally. Two points later, the match was heading into the deciding set.

Osaka broke serve to open the third set to maintain the momentum.

The Associated Press contributed to this report.