MELBOURNE, Australia — Maria Sharapova held her end of the bargain, beating Belinda Bencic 7-5, 7-5 on Sunday to reach the Australian Open quarterfinals and set up a rematch of last year’s final with Serena Williams.

The fifth-seeded Sharapova fired 21 aces and hit 58 winners but needed 2 hours, 5 minutes to beat Bencic on her second match point, converting it with a successful challenge after her forehand was initially called long but was overturned when the ball tracker showed the shot hit the baseline.

Sharapova screamed in delight after the successful challenge, and Bencic stood for a while and had to ask the chair umpire if the match was over.

“This must be the first match I won on a challenge but it felt like a clean ball – I felt like it was on the line. I was really positive about it, but I thought worst-case scenario we’re back to deuce.”

Williams, the six-time and defending champion, went through to the quarterfinals with a 6-2, 6-1 win over Russian Margarita Gasparyan on Rod Laver Arena in 55 minutes.

Under bright sunshine after the roof was opened following morning rain, Williams lost her service in the opening game but quickly found her groove to set up the rematch with Sharapova.

Williams has beaten Sharapova in 18 of 20 matches and hasn’t lost to her since 2004.

“I expected to play her – I look forward to playing the best in the world and that’s what she’s proven in the last year,” she said.

The 18-year-old Bencic, playing in the fourth round of a major for only the third time, again found herself on the wrong end of an opponent’s aces count. Sharapova had 21, including four on her second serve. Last year, Bencic was on the receiving end of 27 aces from Sabine Lisicki.

Kei Nishikori was the first male player through to the quarterfinals, beating No. 9-seeded Jo-Wilfried Tsonga 6-4, 6-2, 6-4 in front of a partisan crowd filled with flag-waving Japanese fans.

The seventh-seeded Nishikori, a 2014 U.S. Open finalist, also reached the quarterfinals at the Australian Open last year and in 2012.

Nishikori has had trouble with Tsonga’s power game in the past, losing most recently to the Frenchman in the quarterfinals of the French Open last year.

But Tsonga lost his serve five times in the match and only managed to break Nishikori once.

On Saturday, a medical emergency overshadowed matches on adjoining courts when Nigel Sears, who is Ana Ivanovic’s coach and Andy Murray’s father-in-law, was rushed to a hospital while both of their third-round matches were in progress.

Four-time finalist Murray beat No. 32 Joao Sousa 6-2, 3-6, 6-2, 6-2 and signed some autographs but skipped the customary on-court interview before leaving Margaret Court Arena to check on the welfare of Sears, the father of his pregnant wife.

Ivanovic was leading Madison Keys 6-4, 1-0 when her match was stopped. She could be seen saying “That’s my coach,” before both players left the court. It was the second time in three days that Ivanovic’s progress was interrupted for a spectator needing medical aid – her second-round match was delayed for a half-hour when a woman fell on the stairs at Rod Laver Arena.

This time the 2008 finalist didn’t come back to win. Despite having breaks in the second and third sets, Ivanovic lost six of the last seven games to lose 4-6, 6-4, 6-4 to the No. 15-seeded Keys.

Australian Open organizers didn’t provide any confirmation on Sears or his condition, although stadium announcer Craig Willis told the Rod Laver Arena crowd: “Nigel Sears had a turn, as we all saw. He’s in the hospital cracking terrible jokes he cracks all the time, and a TV was wheeled into his room so he could watch the match. He’s OK.”

Murray’s match wasn’t stopped but word filtered through as he finished. His brother, Jamie Murray, was keeping track of Sears’ health.