Maria Sharapova won her second-round match in 3 hours, 28 minutes as the temperature in Melbourne approached 109 degrees on Thursday. (WILLIAM WEST/AFP/Getty Images)

Soaked with sweat and clinging desperately for survival, Maria Sharapova was serving for the match when Australian Open organizers finally decided that the searing heat was extreme enough to suspend matches.

That was 5-4 in the third set, 2 hours and 38 minutes into her second-round match against No. 44-ranked Karin Knapp on Thursday. Fifty minutes later, Sharapova converted her fourth match point to clinch her spot in the third round with a grueling 6-3, 4-6, 10-8 victory.

It was 102 degrees when Sharapova’s match started and almost 109 by the time she finished, 3 hours, 28 minutes later. That was just shy of the highest projected temperature during the third straight day of a heat wave in sweltering Melbourne.

Sharapova wasted three match points on serve in the 10th game in the third set, and then had to save break points and serve to stay in the match. She earned a crucial break seven games later, but it was a simple matter of serving out in those brutal conditions.

Three double-faults in the last game — Sharapova’s 10th, 11th and 12th of the match — gave Knapp another break point and a chance to extend it further. But with a reflex backhand that just caught the line, and two errors from Knapp, it was over.

“I wanted this match. I didn’t play my best tennis; I didn’t do many things well,” Sharapova said. “I got through it, and sometimes that’s what’s important.

“When you win match point you get off the court, no matter how you feel and how tough it was, I really ... I love these moments. “

Sharapova, playing her second tournament back from extended time off for a right shoulder injury, wore ice vests in every changeover after the third game, draped ice bags over her shoulders and poured water over her head.

She hit 34 winners but made 67 unforced errors in an increasingly frustrated push to finish points early.

Sharapova recalled a first-round match in sauna-like conditions in Australia in 2007, when she beat Camille Pin 9-7 in the third set.

“I remember being really close to passing out,” said Sharapova, adding that her fitness was better now. “I’m feeling much better.”

She’ll next meet No. 25 Alize Cornet of France, who sobbed after beating Camila Giorgi of Italy, 6-3, 4-6, 6-4, in 2 1/2 hours.

“I went really further than my limits. It was really hot, that’s why I’m so emotional,” Cornet said of the conditions. “Doing something physical in this heat it’s just unbelievable.”

No. 29 Anastasia Pavlyuchenkova had a 6-2, 6-2 win over Mandy Minella in 1:17, but she said her two first-round matches had taken a toll. She said she’d almost passed out in her first-round match.

There were nine retirements in the first round, equaling a Grand Slam record. Ivan Dodig’s retirement on Wednesday increased the tally to 10 — Dodig said he felt like he could die on the court. Others said it was inhumane to make players go on court — and that was before Thursday’s peak temperatures.

Crowd numbers have been down compared with previous years at Melbourne Park, and hardy fans have had to be resourceful to keep cool. The concourse level at Rod Laver Arena, where tickets are not needed for entry, was crammed with hundreds of fans trying to escape the outside temperatures.

No. 11 Simona Halep had a 4-6, 6-0, 6-1 win over American Varvara Lepchenko, who only won one game after needing treatment for heat-related problems late in the second set.

In other results, No. 20 Dominika Cibulkova beat Switzerland’s Stefanie Vogele, 6-0, 6-1, Ukraine’s Elina Svitolina had a 6-4, 7-5 win over Australian wild-card entry Olivia Rogowska and Kazakhstan qualifier Zarina Diyas beat New Zealand’s Marina Erakovic, 6-4, 6-0.

In the only men’s match completed before the extreme heat policy was invoked, No. 16 Kei Nishikori had a 6-1, 6-1, 7-6 (3) win over Dusan Lajovic. Jo-Wilfried Tsonga started his match under the blazing sun and finished it with a roof over the court, beating Thomaz Bellucci, 7-6 (6), 6-4, 6-4, at Hisense Arena.

Six matches were suspended, and play wasn’t expected to continue on those courts until 5 p.m. local time.

No. 10 Caroline Wozniacki was next up on Rod Laver Arena against Christina McHale of the United States, but that match will be played under the roof.