Paris - Former champion Novak Djokovic claimed a hardfought 6-4, 6-7 (6/8), 7-6 (7/4), 6-2 victory over a grieving Roberto Bautista Agut on Friday to book his spot in the French Open fourth round.
The 31-year-old former world number one struggled at times on Suzanne Lenglen court, but eventually came through the four-set battle in three hours and 48 minutes with 13th seed Bautista Agut.
He has now made the last 16 of a Slam for the 43rd time, tying Jimmy Connors on the all-time list.
Bautista Agut was playing in Paris despite the death of his mother last week.
Djokovic, seeded 20 after struggling to find his best form since returning from an elbow injury, will take on Fernando Verdasco for a last-eight place after the Spaniard knocked out fourth seed Grigor Dimitrov.
The Serbian has also reached the second week at Roland Garros for the last nine years in a row.
"Fours hours for the match, I'm a bit tired, Bautista Agut plays with too much patience for me, but I'm very happy to have won the match," said Djokovic, who holds a 10-4 head-to-head record over Verdasco.
"Bautista Agut is a specialist on this surface. Conditions were obviously very difficult, it was sunny, it rained. But it was a special win."
Djokovic, who at 22 in the world is at his lowest ranking since 2006, became frustrated at times during the opening set, but he grabbed the first break of the match in game 10 to take a one-set advantage.
The 31-year-old looked to have found his rhythm when he eased 4-1 clear in the second, but Bautista Agut battled back and saved three set points before taking a tie-break.
Djokovic was given a warning for racquet abuse as his anger boiled over.
He continued to grind away in a topsy-turvy third set, though, with Bautista Agut failing to serving it out as both players were broken three times.
The gruelling encounter passed three hours as Djokovic forced another breaker, which he took on his third set point.
That knocked the resistance out of the Spaniard, as the 12-time Grand Slam champion broke at the first time of asking in the fourth set.
Djokovic is still lacking a little of the killer instinct of previous years, and he failed to serve out the match when leading 5-1, but quickly put any thoughts of a late wobble to bed in the following game.
Results from day six of the French Open at Roland Garros on Friday (x denotes seeding):
Novak Djokovic (SRB x20) bt Roberto Bautista (ESP x13) 6-4, 6-7 (6/8), 7-6 (7/4), 6-2
Fernando Verdasco (ESP x30) bt Grigor Dimitrov (BUL x4) 7-6 (7/4), 6-2, 6-4
Kei Nishikori (JPN x19) bt Gilles Simon (FRA) 6-3, 6-1, 6-3
Alexander Zverev (GER x2) bt Damir Dzumhur (BIH x26) 6-2, 3-6, 4-6, 7-6 (7/3), 7-5
Barbora Strycova (CZE x26) bt Katerina Siniakova (CZE) 6-2, 6-3
Yulia Putintseva (KAZ) bt Qiang Wang (CHN) 1-6, 7-5, 6-4
Madison Keys (USA x13) bt Naomi Osaka (JPN x21) 6-1, 7-6 (9/7)
Mihaela Buzarnescu (ROU x31) bt Elina Svitolina (UKR x4) 6-3, 7-5
Daria Kasatkina (RUS x14) bt Maria Sakkari (GRE) 6-1, 1-6, 6-3
Caroline Wozniacki (DEN x2) bt Pauline Parmentier (FRA) 6-0, 6-3