The 24-time Grand Slam champion, who has won a record-equalling five titles at the California desert event, won the first set but was taken apart in the second before asserting his authority to seal victory in two hours and two minutes.
"Great performance from Alex," Djokovic said. "We know each other, we speak the same language, obviously, his whole family is Serbian. He's one of the best talents we have out there, particularly, one-handed backhand and, you know, it's very rare nowadays, and he's played a great tournament so far.
"Today I knew if he serves well and if he picks his spot in the box, it's going to be hard to break. That's what happened, actually. I mean, he was serving extremely well," the 38-year-old added.
In the women's draw, fifth seed Jessica Pegula demonstrated her resilience by recovering to defeat Jelena Ostapenko 4-6, 6-3, 6-2 and book her place in the fourth round.
The American dropped the opening set to the hard-hitting Latvian and former French Open champion before finding her range to take the next two sets and seal a hard-fought victory.
