Johanna Konta held off a spirited fightback from Romania's Ana Bogdan to book her place in the last eight of the Morocco Open in Rabat.
Konta looked set for an easy victory as she cruised through the opening set and moved 4-1 ahead in the second, only for Bogdan to raise her game considerably and level the match by winning a second-set tie-break.
However, seventh seed Konta reasserted her authority in the decider to seal a 6-1 6-7 (6/8) 6-2 victory and advance to only her second quarter-final of the season.
Konta made the ideal start with a break of serve in the opening game of the match and two more gave her the set in just 27 minutes.
Another break early in the second handed the British number one control of the contest, but Bogdan began to find her rhythm from the back of the court and broke Konta twice to lead 6-5.
The world number 132 was unable to serve out for the set and Konta held a match point at 6-5 with two serves to come, only to lose the next three points in succession.
A deciding set was the last thing Konta needed after having to save three match points in the previous round, but the 27-year-old regrouped well and broke Bogdan in consecutive service games to close out a hard-fought win in one hour 59 minutes.