Novak Djokovic claimed the all-time record for most men's singles match wins at Wimbledon, but had to overcome moments of visible frustration to beat qualifier Roman Safiullin and reach the quarter-finals.
Djokovic had matched Roger Federer's record with his third-round victory on Friday, and the 39-year-old earned his 106th win at SW19 by defeating the 132nd-ranked Safiullin 7-6 (8-6) 6-3 3-6 6-3 on Sunday.
That is second only to the 120 wins achieved by nine-time women's champion Martina Navratilova.
The Serb beat Safiullin despite an apparent issue with his eyes early in the contest, while he later received a warning for an audible obscenity and was fortunate to avoid a penalty after firing a ball to the back of the opposite side of the court when he lost serve in the third set.
"Survive to thrive - that's how I feel," Djokovic said, reflecting on his performances in the first week.
"Hopefully the thriving part is coming!"
Acknowledging his behaviour during the match, he added: "I'm known for my outbursts and meltdowns, I had a few of those today so I apologise.
"Our mind wanders all the time. It is very hard to keep it in the present moment. Whoever manages to do that is the winner."
Djokovic remains on course for a tantalising semi-final showdown with world number one Jannik Sinner, whose title defence continued to gather momentum as he outclassed qualifier Shintaro Mochizuki.
Sinner, a four-time major winner, claimed his third consecutive straight-set victory since surviving a huge scare in his opening five-set win against Miomir Kecmanovic.
The 6-3 7-6 (7-0) 6-3 victory sent Sinner into his fifth consecutive Wimbledon quarter-final, where the Italian will face Germany's Jan-Lennard Struff.
Safiullin appeared full of belief as he began his bid for a monumental upset, responding to Djokovic's immediate break of serve by winning five of the next six games.
But he could not convert that positive position, faltering as he served for the set at 5-3 and eventually coming up short in the tie-break.
Despite the 125-place ranking gap, Safiullin had continued to prove a nuisance in the second set until he presented Djokovic with an opening in the sixth game, and eventually conceded a fourth break point.
Having to come through three consecutive five-set matches since the final round of qualifying to arrive here began to take its toll as Safiullin required a medical timeout for a left-leg problem during the third set.
But he successfully managed that issue to capture his first set in four tour-level meetings with Djokovic, who landed only 57% of his first serves and took out his frustration on a ball after Safiullin took a sixth break point for a 4-2 lead.
Despite that incident, which was booed by the crowd, Djokovic quickly reset and launched a decisive fourth-set response, breaking to love in the second game as Safiullin's challenge began to fade.
Lifting over a closing drop shot to serve out victory to love, Djokovic embraced Safiullin at the net - and there was deserved warm applause for the spirited qualifier's performance as his superb run, in which he also ousted 12th seed Andrey Rublev, came to an end.
Djokovic has now been taken to four sets in three of his four wins at this year's championships, but remains in the hunt for history after reaching his 17th Wimbledon quarter-final.

