World number one Victoria Azarenka improved her unbeaten record to 18-0 this year after battling past Germany's Mona Barthel 6-4 6-7 7-6 in the second round of the Indian Wells WTA tournament on Friday.
Top seed Azarenka squandered a 5-1 lead in the second set and then came from 1-4 and 3-5 down in the third before sealing a tight victory 8-6 in the tiebreak when her opponent hit a backhand long.
The Belarusian, who clinched her first grand slam crown at the Australian Open in January, double-faulted 12 times in an error-strewn encounter and celebrated in subdued fashion when the match ended after three hours on the stadium court.
"It was survival, but it's a good feeling also to come through after a match like this with a win," a relieved Azarenka told reporters. "I could have been already beating myself up somewhere in my house after losing.
"But I'm here and I got through, and that's a good sign ... to win when you're not playing your best, it's more joyful.
"I won this match mentally more than physically or tactically or whatever. That was really what brought me a win today, my fighting spirit, till the last moment."
Azarenka will next meet 25th-seeded Russian Svetlana Kuznetsova, who advanced after Swiss Timea Bacsinszky retired hurt with a wrist injury when trailing 3-6 0-2.
Barthel, who had lost to the Belarusian in their two previous meetings this year, was delighted with her gutsy display at the Indian Wells Tennis Garden.
"I stayed really calm ... but she's ranked No. 1 and she really kept fighting for every point," said the 37th-ranked German, who won her first WTA title in Hobart in January.
"She deserved to win in the end but of course it was really close."
Asked whether she had changed her strategy after trailing 1-5 in the second set, Barthel replied: "I was just trying to continue to play like that because I knew it was close.
"I lost some games where I had some game points, so I just was trying to fight, just trying to continue. I have nothing to lose against the world No 1 so I can just play my game. I'm happy I could turn the second set around."
Barthel, who twice served for the match in the third set before Azarenka took control, frequently troubled the world number one with her rasping groundstrokes and clever changes of pace.
"I think she played unbelievable tennis, the best of our previous matches," Azarenka said of the 21-year-old.
"I have to give her a lot of credit for making me also not play well.
"She really stepped it up and showed some incredible strokes and serves so all the credit to her. Mona was really motivated to beat me today."