Novak Djokovic successfully navigated a tricky encounter with Alejandro Davidovich Fokina to continue his quest for a record 23rd men's Grand Slam singles title at the French Open.
The animated Serb, seeded third, beat the Spaniard 7-6 (7-4) 7-6 (7-5) 6-2.
He will face Polish 13th seed Hubert Hurkacz or Peru's Juan Pablo Varillas in the fourth round.
"I knew it was going to be a difficult match, a physical match," 36-year-old Djokovic said.
He is through to the fourth round at Roland Garros for the 14th successive year.
Earlier, seventh seed Andrey Rublev was knocked out after letting slip a two-set lead against Lorenzo Sonego.
Italian Sonego won a five-set thriller 5-7 0-6 6-3 7-6 (7-5) 6-3 on the Roland Garros clay.
Djokovic is yet to drop a set at Roland Garros this year but came closer than he would have liked against Davidovich Fokina - a player he lost to on the Monte Carlo clay last year - with the first two sets going to tie-breaks and lasting more than three hours combined.
It is in Paris that Davidovich Fokina, ranked 34th in the world, has enjoyed his best success at a Grand Slam, reaching the quarter-finals in 2021, and he came out swinging against Djokovic with big hits and sublime drop shots causing all sorts of trouble for the former world number one.
After edging a first set in which he was twice a break down, made four double faults and received a time violation, Djokovic saved set point in the second before squeezing past his opponent in a second tie-break and then celebrating wildly.
Before the start of the third set, he received medical attention to his left leg but, geed up, dominated the remainder of the match to end Davidovich Fokina's hopes of an upset.
"He competed very well, he's an amazing fighter and an amazing player," Djokovic said of his opponent. "There are not many weaknesses in his game and he played a great match.
"A win is a win. I thought if I lost the second set we would probably play five hours today.
"You have to be ready, that is what Grand Slam tennis is all about. It takes a lot of effort but you have to believe in yourself. I am proud of the performance today for sure.
"Three hours for two sets is obviously a lot. It required a lot of energy and my priority now is to recover. Tomorrow I will have a day off and I'll be ready to play again."
Rublev exits in Sonego's 'most difficult win'
It was a shock defeat for Russia's world number seven Rublev, who has reached the quarter-finals in his last three Grand Slam appearances.
World number 48 Sonego will play 11th seed Karen Khachanov next.
After losing the first two sets, Sonego started playing more aggressively and pulled back the third set before winning a tie-break in the fourth to force a decider.
He broke Rublev's serve to go 5-4 up and serve for the match, sealing it when the Russian volleyed into the net on Sonego's first match point.
The victory is Sonego's first against a top-10 player at a Grand Slam, while it is the first time Rublev has been defeated after being 2-0 up.
"I think I played my best tennis this year," Sonego said. "There was a lot of things in my mind, but I tried to stay focused every point and enjoy the moment.
"I think this is the most difficult win of my career, for sure."
Earlier on Friday, Russia's Khachanov came through his third-round match in four sets, beating Australian Thanasi Kokkinakis 6-4 6-1 3-6 7-6 (7-5).