British number one Kyle Edmund moved into the French Open third round by beating Hungary's Marton Fucsovics 6-0 1-6 6-2 6-3 in a strange match.
Edmund, seeded 16th, raced to the opening set in just 27 minutes against the world number 45.
Fucsovics looked a different player as he took the second set quickly, before momentum swung back to Edmund.
Edmund edged a tight fourth set to seal victory after two hours and 16 minutes.
"The second set is something to learn from but I'm happy to come through," Edmund said.
"When I'm playing at my best it's very good but I can't play like that the whole time. When I'm not playing my best, I have to find a way to win. This year I've done that a lot better."
He is the last British player left in the singles after Cameron Norrie lost to Lucas Pouille and Heather Watson was beaten by Elise Mertens.
The Briton will next play Italy's Fabio Fognini, a clay-court specialist who has beaten 16-time Grand Slam champion Rafael Nadal twice on his favoured surface.
Reaching the last 32 equals Edmund's best performance at Roland Garros, where he lost against South African Kevin Anderson in a third-round epic last year.
Bettering his record in Paris would be another notable landmark in a year which has already seen him reach the Australian Open semi-finals - his first appearance in the last four of a Grand Slam - and climb into the world's top 20 for the first time.
Edmund is treading new ground at Roland Garros: his first Grand Slam as the British number one and his first as a seed.
The 23-year-old showed a ruthless streak in his opening match against promising Australian teenager Alex de Minaur, although that was not as evident - perhaps as a result of a finger injury which needed treatment - in the first hour of an erratic match.
Edmund eased through a rapid opening set which saw Fucsovics hit 15 unforced errors and only claim 15 points.
However, momentum completely shifted in the second set as a different Fucsovics reappeared after the changeover.
The Hungarian, making his debut in the Roland Garros main draw, gained a foothold in the match by breaking Edmund's opening serve in the second set, the Briton's game disintegrating as Fucsovics leveled in 34 minutes.
Yet the match took another twist.
Edmund dropped just four points to lead 3-0 in the third, breaking serve again in the eighth game to regain the lead.
He saved three break points midway through a tight fourth set, then took his first opportunity at 4-3 to leave him serving for the match.
And a long return by Fucsovics saw him take a second match point to book his place in the last 32.