Djokovic started the proceedings and the first game of the day resulted in a 27-shot rally which he finished with a forehand down the line.
Ferrer then raced to 0-30 on Djokovic's serve, and although he missed the first of two break points, he made sure of the second with a drop shot to move into a 3-2 lead.
The Spaniard was then able to fend off a break point from his opponent to hold serve and edge further ahead.
Both players were able to hold serve after that, but with Ferrer serving for the set, Djokovic broke back. The Serb then took control, seeing out the first set 7-5.
However, Ferrer showed his quality, breaking Djokovic again in the first game of the second. A succession of forehand winners then increased his lead to 3-1.
With Ferrer serving for the set, Djokovic was able to break back after his opponent netted a forehand.
He then broke and held his serve to make it 6-5 and secured the deciding set 7-5 when Ferrer netted.