Novak Djokovic revealed he was close to quitting against Francisco Cerundolo with a knee injury, before forcing his way through the pain barrier and into the French Open quarter-finals.

The reigning champion, who is eyeing a record-breaking 25th major singles title this week, came through a second successive five-set epic to book his place in the last eight at Roland-Garros.

Djokovic finished his third-round clash with Lorenzo Musetti after 3am in the early hours of Sunday morning, and was on Court Philippe-Chatrier over four-and-a-half hours to battle past Cerundolo.

Although, the Serb looked like he could be heading for an early exit when he required treatment for a knee problem in the second set, having dominated the first 6-1.

It certainly affected the three-time champion as he fell two sets to one behind before receiving medication for the issue.

Djokovic dug deep from 4-2 down in the fourth set to force a decider, which he subsequently controlled to scrape over the line a 6-1 5-7 3-6 7-5 6-3 winner.

"For the last couple of weeks, I have had slight discomfort in my right knee, but I haven't had an injury that would concern me at all," he told reporters during his post-match press conference.

"I was playing a few tournaments with it, and had no issues until today. I actually felt great coming into the match - as good as I could under the circumstances - and played really well [in the] first set.

"Then, in the third game of the second set, I slipped, one of the many times that I slipped and fell today. That affected the knee. I started feeling the pain and asked for the physio treatment and the medical timeout, and tried to take care of it.

"It did disrupt me definitely in play. For two sets, two sets and a half, I didn't want to stay in the rally too long. Every time he would make sudden drop shots or change directions, I would not be feeling comfortable doing the running.

"At one point, I didn't know whether I should continue or not with what was happening. I got the medication, and then after the third set was done, I asked for more medication, and I got it.

"I don't know how I won. I don't know what will happen tomorrow or if I'll be able to step out on the court and play. I hope so. Let's see what happens."

Next up for Djokovic is a quarter-final meeting with two-time runner-up Casper Ruud, and what will be a repeat of last year's final.