MELBOURNE, Australia — As her match dragged more than three hours, Maria Sharapova stomped and grunted and stole glances at her box. Her face twisted into grimaces. She seemed happiest on changeovers, underneath the shade of an umbrella, an ice vest draped over the back of her neck.

So much appeared stacked against her: temperatures that climbed to 44 degrees Celsius (111 Fahrenheit) and forced Australian Open officials to invoke their “extreme heat policy” and shut down play on the outside courts; a serve that turned shaky with a series of double faults; and an opponent, Karin Knapp of Italy, who played a fearless brand of tennis, as if buoyed by the heat.

Sharapova botched three match points earlier in the third set, as momentum swung in Knapp’s direction. Inside Rod Laver Arena, the air felt thick, heavy, even with the roof partially closed to provide shade. Programs became makeshift fans. Empty water bottles filled trash cans. To say it was hot was to say there was tennis — two obvious assertions.

Knapp slung winners from the baseline, hitting harder, her shots more daring the later the match went. Sharapova fought. She fought through three doubles faults. She fought through temperatures that turned Melbourne Park into tennis’s Mojave Desert. She fought until ahead late in the third set, when Knapp sent a backhand long and their contest ended, finally, mercifully, the tally 6-3, 4-6, 10-8. Sharapova advanced to the third round.