British number one Johanna Konta saved three match points - on her way to winning 11 straight points - to level her Morocco Open first-round match before going on to claim victory.
Konta, 27, saw off China's Yafan Wang, ranked 56th - nine places below the Briton - in a 4-6 7-6 (7-0) 6-4 win.
She was on the verge of defeat as she trailed 40-0 at 6-5 in the second set, only to stage a remarkable fightback.
"I'm very proud of myself, for the way I competed," Konta said.
"It was a tough match and I'm very happy to have battled through to find a way to win that second set and then come back from 3-1 down in the third.
"I also had match point at 5-3 so there was very little in the match."
Konta will play Romania's 132nd-ranked Ana Bogdan in the next round.