World number two Nadal becomes the first man in the Open era to capture two ATP events at least seven times.
"This is the hardest match I had on clay court this season, David always takes you to the limit," Nadal told Spanish TV. "A bit of it was lottery, luck fell on my side today."
The victory was the perfect way to mark the 10th anniversary of his first match on the main tour.
On 29 April 2002 Nadal beat Ramon Delgado 6-4 6-4 in Mallorca, and exactly a decade later he collected the 48th title of his career.
Nadal, 25, overturned an early break of serve before saving a break point in game six and bringing up one of his own in game 11.
But Ferrer was equal to the task and not only held firm but earned himself a glorious opportunity at 6-5.
He had five opportunities to take the opening set but Nadal showed incredible defensive skills in forcing a tie-break.
After mini-breaks were exchanged, Ferrer sent down a double-fault to hand over the momentum and he was duly punished.
Nadal was now regularly hitting the lines and when he broke to move 3-1 ahead in the second set, the finishing line was in sight.
However, Ferrer hit straight back and the crowd were in raptures as a Nadal double-fault meant Ferrer would serve for the set at 5-4.
But his game capitulated at the worst possible moment and a forehand sailed wide to squander the chance.
Nadal held for 6-5 and then broke to love for a fine victory that improves his head-to-head against Ferrer to 14-4.
Nadal my Idol