Djokovic, bidding to equal Federer’s men’s record of eight Wimbledon titles and win an all-time record 25th major title, was the overwhelming favorite against Safiullina but his latest test was far from easy.
Safiullin, a former quarter-finalist, was in tears after his stunning third-round win over rising star Joao Fonseca, battling an injury he feared he would never fully recover from six months ago.
The 28-year-old free-kick Russian was rewarded for his persistence as he took his first set in four meetings with former world number one Djokovic, extending the match beyond the three-hour mark.
But as in the previous round against Arthur Rinderknech, Djokovic took the fourth set to seal the victory and set up a round of 16 meeting with third seed Canadian Felix Auger-Aliassime or Spaniard Alejandro Davidovich Fokin.
Safiullin appeared full of faith as he began his attempt at a monumental upset, responding to Djokovic’s immediate break of serve by winning five of his next six games.
But he was unable to capitalize on this positive position, failing to serve for the set at 5-3 and ultimately losing in the tiebreaker.
Despite a 125-place ranking gap, Safiullin continued to cause trouble in the second set until he handed Djokovic his debut in the sixth game and eventually missed a fourth break point.
Having to play three consecutive five-set matches since the final round of qualifying arrived here began to take its toll as Safiullin required a medical timeout with a left leg problem during the third set.
But he rose to the challenge and captured his first set in four tour-level encounters with Djokovic, who completed just 57% of his first serves and took out his frustrations on the ball after Safiullin took his sixth break point to lead 4-2.
Despite this incident, which was booed by the crowd, Djokovic quickly recovered and launched a decisive response in the fourth set, breaking into love in the second game as Safiullin’s challenge began to fade.
With a final throw to give love the victory, Djokovic embraced Safiullin at the gate – and there was well-deserved warm applause for a spirited qualifying performance as his superb run, which also saw him oust 12th seed Andrey Rublev, came to an end.
Djokovic has now managed four sets in three of his four victories at this year’s championships but remains in the hunt for history after reaching his 17th quarter-final at Wimbledon.