The Serbian’s task does not get any easier, though, as his semi-final opponent is Alexander Zverev the man who denied him a shot at the golden slam by beating him at the Olympics.
Djokovic said on court: “He’s in tremendous form, he’s been winning a lot. He has comfortably moved to the semi-finals here.
“I know his game well, we played in Tokyo. He’s one of the best players in the world, but the bigger the challenge the more glory in overcoming it.
“This was a great match, with a lot of energy on and off the court. Matteo is a terrific player and every time we face each other it’s a close battle.
“When I lost the first set I managed to forget about it and move on. I was locked in at the start of the second and it was the best three sets I’ve played so far.”
It was a 26th consecutive victory at a major for Djokovic and came on the 52nd anniversary of Rod Laver becoming the last man to win all four grand slam events in the same year.
But it was far from plain sailing in a brutal 77-minute first set in which both players put each other’s serve under intense scrutiny.
Berrettini made the breakthrough for 6-5 with a sweeping cross-court forehand and although the Italian squandered three set points, an ace and a wide Djokovic forehand eventually proved decisive.
However, once Djokovic drew first blood in the second and made just three unforced errors to confidently level the match, Berrettini looked beaten and the result was no longer in doubt.
Fourth seed Zverev was a comfortable 7-6 (6) 6-3 6-4 winner against South African surprise package Lloyd Harris.
The German will go into the last-four showdown buoyed by his semi-final win over the 20-time grand slam champion in Tokyo.
“I mean, it’s the biggest tournament in the world. It’s the Olympics,” he said.
“Winning there against the world number one, especially as I was down a set and a break, being kind of out of the match, then coming back, it was different than the other matches. The emotions were different.
“This year it seems like nobody can beat him in a big match, nobody can beat him at the grand slams.
“I feel like I was the first player to beat him in a very big match this year. That does give you something.”