The Serb ended his opponent's 46-match unbeaten streak at the tournament with a 6-2 7-6(1) win over the world number five.
Speaking after the match, the Spaniard said: "Congratulations Novak, what you're doing is just amazing. Congratulations to you for winning my favourite tournament.
"Thank you very much all my team for supporting me, the last year was especially hard for me so without them and without the support of all of you, all the messages I received during that time, was very positive energy for me."
Nadal has won the tournament for the last eight years.