INDIAN WELLS, Calif. — Poised to return to the top spot in next week's world rankings, Angelique Kerber narrowly avoided an upset at the BNP Paribas Open on Monday.

Kerber outlasted Pauline Parmentier of France 7-5, 3-6, 7-5 in the third round when temperatures soared to the upper 90s (36 C) under cloudless skies in the Southern California desert. That's nearly 20 degrees higher than the seasonal average of 78 (25 C).

One of their games lasted 11 minutes and another went on for 9 1/2 minutes. Kerber rallied from a 1-4 deficit in the third set.

"I was starting to believe in myself again," she said.

The second-seeded German arrived early this year to better prepare for an event whose slow courts and extreme temperatures have bedeviled her in the past.

In nine previous appearances, Kerber's best results were semifinal berths in 2012 and '13. She had lost in the second round for the past three years.

"The conditions are also very tough here. When you play day session, it's really, really hot. You play night session, it's a little bit cooler and could be really cold," she said. "The balls are flying a little bit different, as well."

Regardless of Kerber's results, she is assured of regaining the No. 1 ranking from Serena Williams, who withdrew before the tournament began because of what she said was a left knee injury. Kerber dropped to No. 2 after the Australian Open in January.

Simona Halep, the 2015 champion, lost to 28th-seeded Kristina Mladenovic of France 6-3, 6-3.

Madison Keys defeated Naomi Osaka 6-1, 6-4 in just under an hour in front of her coach Lindsay Davenport. Osaka failed to convert any of her four break points.

Venus Williams beat Lucie Safarova 6-4, 6-2, winning 75 per cent of her first-serve points and all eight of her net points as the temperature climbed to near 100 degrees (37 C). Williams' mother Oracene and sister Isha Price used white towels to shield themselves in the stands.

"That sun is strong," Williams said. "Thankfully, I live in Florida, so I think it prepares you for a lot. I got pretty comfortable pretty fast."

Safarova had 27 unforced errors to just nine for Williams.

"I felt like I was being able to string points together, which of course puts pressure on my opponents if I'm not making as many errors," Williams said.

Williams is back in the desert for the second straight year after boycotting the tournament since 2001. That's when she and her father were jeered and said they heard racial taunts after she withdrew from her semifinal against younger sister Serena because of an injury.

Other women's winners were No. 13 Caroline Wozniacki, No. 14 Elena Vesnina and American Lauren Davis.

On the men's side, No. 3 Stan Wawrinka beat 28th-seeded Philipp Kohlschreiber 7-5, 6-3. Vancouver's Vasek Pospisil's run ended with a 6-7 (4), 6-3, 7-5 loss to fellow qualifier Dusan Lajovic. Pospisil upset No. 1 Andy Murray in the second round.

No. 10 Gael Monfils defeated John Isner 6-2, 6-4 to set up a fourth-round match against No. 8 Dominic Thiem, who beat No. 29 Mischa Zverev 6-1, 6-4.

No. 13 Tomas Berdych was beaten by lucky loser Yoshihito Nishioka 1-6, 7-6 (5), 6-4.

No. 21 Pablo Carreno Busta advanced via walkover when 16th-seeded Roberto Bautista Agut withdrew because of an abdominal muscle injury.