Simona Halep came through a stern test from Petra Martic in the wind to reach the semi-finals of the Indian Wells Masters.
Halep, guaranteed to remain world number one after this tournament following Caroline Wozniacki's exit, came from a break down in the final set to win 6-4 6-7 (5-7) 6-3.
The 2015 champion has lost only one of 18 matches this year - against Wozniacki in the Australian Open final - but she was made to work by the unseeded Martic.
Halep, who will play Naomi Osaka in the last four, hit 37 winners and made as many unforced errors in a topsy-turvy encounter but finished strongly to prevail.
Hurricane Halep— BNP Paribas Open (@BNPPARIBASOPEN) March 14, 2018
Simona Halep storms back to win the final *FIVE* games of the match against Petra Martic, finishing out a 6-4 6-7(5) 6-3 roller coaster
Reward: A trip the #BNPPO18 SFs pic.twitter.com/eqaLyMEoTj
The top seed made an ominous start, losing just one point as she won the first two games in the California desert and looked more comfortable in testing conditions.
Halep kept unforced errors to a minimum and was a set up in fortuitous fashion when a forehand struck the net and a scrambling Martic failed to return.
Martic responded well in the second, opening up a 3-0 lead with a more positive approach before Halep got back on serve at 5-4 with a rasping forehand.
The Croatian increased the intensity in a tie-break which she started with an ace and a frustrated Halep was forced to go the distance after sending a forehand long.
Halep marched back onto the court following some words of wisdom from coach Darren Cahill, but the favourite was up against it at 3-1 down.
The Romanian came storming back, though, breaking twice to get back in front and hitting a couple of sublime winners as she served out the match.
Her semi-final opponent was decided later on Wednesday as Osaka produced a fine display to cruise past fifth seed Karolina Pliskova 6-2 6-3.