Britain's Dan Evans reached the second round of the Madrid Open with victory over Frenchman Jeremy Chardy.
The British number one, who had never won in Madrid, came through 7-6 (8-6) 6-7 (7-9) 6-2.
Evans had three match points in the second set but the world number 51 saved them to send it to a decider.
However, the world number 26 started the third set positively and broke his opponent twice, sealing it with an ace to go through to the last 32.
It was Evans' third win out of three against Chardy this year after victories on hard courts in Melbourne and Doha.
"I'm happy to be through," said Evans, who had lost in the first round on his only previous appearance at the event in 2017.
"The first round is always tough but it was a good match and I felt good on my serve.
"I'm moving better on clay and I've found a medium between being aggressive and standing too far back, and I'm winning matches."
Chardy controlled much of the first set as Evans recovered an early break and then saved a set point at 4-5 before taking advantage of an untimely double fault from his opponent at 6-6 in the tie-break.
The second set saw Evans holding his serve much more easily and putting pressure on Chardy. But a match point came and went at 5-4 and then two more in the tie-break before he eventually lost it.
But the 30-year-old regrouped for the decider and he will meet either 12th seed Hubert Hurkacz of Poland or Australian John Millman in the next round.