The Serbian triumphed 6-7 (4–7), 6-3, 6-4 over the Spaniard, having thrashed David Ferrer 6-0, 6-3 in the semi-finals.
After the win over Ferrer, Djokovic told reporters he felt he was playing “amazing” tennis.
“Last year I played an amazing few matches and this year I am playing amazing as well,” Djokovic said.
“It felt great, after a few weeks of preparation and hard work, more focusing on fitness and just gradually increasing the hours on the tennis court.
“It was a perfect performance against one of the best players in the world, especially in 2012 where he had his best year.
“It was a great performance and a great confidence boost for me. It’s something I will look at as a positive indication of my form in this tournament.”