MELBOURNE, Australia — As Serena Williams made her way out to the Australian Open’s main court during pre-match introductions, the voice booming over the stadium’s speakers implored spectators to welcome ‘‘the world’s No. 1 player — from Romania, Simona Halep.’’
Williams, wearing headphones, quickly pivoted and retreated back into the tunnel she’d just emerged from, making way for her fourth-round opponent Monday night. A couple of hours later, when Williams wrapped up her 6-1, 4-6, 6-4 victory over Halep in a contest filled with momentum swings and fantastic play by both, it was clear which woman really is No. 1, regardless of what the current rankings say.
‘‘It was a really intense match, and it was some incredible points,’’ said Williams, who improved to 9-1 against Halep and now meets 2016 US Open runner-up Karolina Pliskova in the quarterfinals. ‘‘I love playing tennis and I love to play here and I love to be back out here.’’
The 37-year-old American sat out last year’s Australian Open after giving birth to a daughter months earlier and dealing with health complications. Since returning to the tour, Williams has reached the past two Grand Slam finals, losing both — and leaving her still one shy of equaling Margaret Court’s record of 24 major singles titles.
Halep offered up the first real test Williams has faced at this year’s Australian Open, where she is bidding for an eighth trophy, pushing her throughout a back-and-forth matchup that was a fascinating mix of power, court coverage and shotmaking.
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 then broke for a 4-3 lead and finally was on her way.
‘‘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.’’
That she does. She also makes abundantly clear just how much every point means to her.
Against Halep — who beat Serena’s older sister, Venus, in the third round — Williams frequently pumped her fists or yelled ‘‘Come on!’’ after key exchanges. When Halep hit one shot that caught the net tape and barely trickled over for a winner, Williams looked pained and complained, ‘‘I mean, it’s not fair.’’
Pliskova advanced earlier Monday with a 6-3, 6-1 victory over two-time major champion Garbine Muguruza.
The other quarterfinal on that side of the women’s bracket features No. 4 Naomi Osaka against No. 6 Elina Svitolina. Osaka, who beat Williams in last year’s U.S. Open final, edged No. 13 Anastasija Sevastova 4-6, 6-3, 6-4 in the fourth round, while Svitolina got past 2017 U.S. Open finalist Madison Keys 6-2, 1-6, 6-1.
Williams and Halep traded jittery breaks of serve in the opening two games, as each double-faulted and flubbed shots. But Williams settled down first, compiling a 10-3 edge in winners to grab the opening set.
‘‘I felt,’’ Halep said afterward, ‘‘like I had been hit by the train.’’
Halep then fell behind by a break in the second, before suddenly seeming to awaken and display her own brand of baseline talent that carried her to the Australian Open final and French Open championship in 2018.
Halep made only 12 unforced errors in the entire match, and that clean play got her back into things, especially as Williams’ miscue count rose to a final tally of 31.
‘‘She’s back to being Serena on both the physical and emotional side. So I think her level is good,’’ said Williams’ coach, Patrick Mouratoglou. ‘‘I think she needed a big fight, and it happened today, and I think it’s a great thing — especially when it ends like that.’’
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 to the start of Williams’ run to the 2017 title, which she won while pregnant.
‘‘Overall, I’m hanging in there. I think overall, I’m solid,’’ Williams said. ‘‘I can definitely go to a new level. I have to if I want to stay in the tournament.’’
Because this was a night match, her 16½-month-old daughter, Olympia, couldn’t stay up to watch, Williams said, adding: ‘‘But we’re going to have a fun morning tomorrow’’ watching films.
Williams joked she’s seen ‘‘Frozen’’ and ‘‘Beauty and the Beast’’ several thousand times apiece.
‘‘I’m like, ‘Olympia, there’s a plethora of movies to choose from,’’’ Williams said. ‘‘’Can you choose another one?’’’