The 30-year-old Nadal won his fifth Mutua Madrid Open title and his record-tying 30th ATP World Tour Masters 1000 crown, matching World No. 2 Novak Djokovic for the all-time lead.
The 23-year-old Thiem was contesting his first Masters 1000 final, and fell to 8-5 in career finals and 1-2 this year.
Both players were producing some brilliant winners but Nadal eventually took the breaker 10-8 when Thiem's usually trusty forehand flew just long to end a set which had lasted nearly an hour and a half.
Nadal broke Thiem to start the second and carried it all the way to the end of the set, where he ran into trouble closing out as Thiem made one final push.
"I can not promise to play or pull out right now", he said.
"How he plays after his serve, it's unbelievable", Thiem said afterward.
In contrast, Nadal cruised to a 14-0 win record on clay when he beat Djokovic 6-2, 6-4 in the semi-finals on Saturday. It has been clear what each of his two previous La Decima wins meant to him, and this was no different, as he sank to his knees on that final victor. "I will try to improve the things I didn't do that good in Barcelona and then we will see what happens". I could have played better today.
The Austrian had his chance too to get right back in the match with four break back points, but couldn't take advantage as Nadal finally secured victory with his fourth match point. I really enjoy these tournaments.
"The truth is I was up against an opponent who in the next five to 10 years will be fighting for the most important titles so I'm very happy to have won; it was a very exciting game", Nadal told Television Espanola. "It's logical that after a hard week, I've been playing a lot of matches, a lot of hours out there on the court, I feel like it's sore, a little bit exhausted".
"I'm just going to go along, and in the next three, four weeks maximum, I'll make my decisions around that, about the team", Djokovic said.
Novak Djokovic moved into the semi-finals of the Madrid Masters on Friday without hitting a ball as Kei Nishikori withdrew citing the recurrence of a wrist injury, tournament organisers said.
Nadal's superiority, on top of Federer's three titles in the 2017's biggest hard-court events to date, supports the curious impression that men's tennis is stuck in a 10-year timewarp.
Nadal held his serve to love in the ensuing game to move ahead at 6-5, and Thiem drove on to the tiebreak despite his opponent's best efforts to avoid any need with a last-ditch break attempt.
"This is a very emotional period of the season", Nadal said. "I did well in Monte Carlo and Barcelona, and also here".
Indeed Djokovic could only muster four points in the opening four games as Nadal raced into a 4-0 lead.