Rafael Nadal put the doubts behind him to maintain his iron grip on the Coupe des Mousquetaires.
Nadal now stands on his own as the most successful singles player, male or female, at a single grand slam, having moved clear of the 11 titles won by Margaret Court at the Australian Open.
But, what appeared routine from the outside, the 33-year-old losing just two sets all tournament, felt far from that way inside Nadal's camp.
Coach Carlos Moya said: "It's been the toughest period for sure since I'm there. It was really hard. He really had to push himself to the limit to be back on the court, to practise, to be motivated.
"He had an unbelievable attitude in those bad moments and that's what took him here today. Hats off to what he's done this month and a half because it's easy to play well when all the things are working well, but what he's been through this last couple of months is showing what a competitor he is and mentally that he's a genius."
Nadal missed the end of last season because of knee trouble and then a foot operation and he was forced onto the sidelines again after Indian Wells in March when his knees played up once more.
Nadal arrived at the Italian Open in Rome last month without having won a title on clay for the first time in 15 years, but lifting the trophy in the Italian capital paved the way for more success here.
"After Indian Wells, mentally I was down," he said. "It's tough when you receive one (punch), another, and then sometimes you are groggy."
Nadal pinpointed a first-round victory over Leonardo Mayer at the Barcelona Open in April, where he had to come back from a set down, as the turning point.
He said: "After the first round in Barcelona, I was able to stay alone for a couple of hours in the room and think about what's going on, what I need to do.
"One possibility was to stop for a while and recover my body. And the other was to change drastically my attitude and my mentality. Finally I think I was able to change and was able to fight back for every small improvement. And since that match things have been improving every single day until today.
"Of course to have this trophy with me means a lot. But the personal satisfaction of changing the dynamic is the thing that I am more satisfied with."
Another title did not look a formality when Thiem, who had knocked out Novak Djokovic in a remarkable semi-final played over two days, won the second set to level the match.
Nadal had taken a brutally physical opening set, but a poor game at the end of the second betrayed the Spaniard's nerves.
However, Thiem could not maintain his level at the start of the third set and from there Nadal strode away.
The world number two now has 18 slam titles overall, meaning for the first time he has closed to within two of his great rival Roger Federer, whose all-time men's record of 20 titles appears increasingly within reach for either Nadal or Djokovic.
"It's a motivation, but it's not my obsession," said Nadal. "You can't be frustrated all the time because the neighbour has a bigger house than you or a bigger TV or better garden. That's not the way that I see life."
Thiem was trying to do what only Stan Wawrinka has managed by beating Djokovic and Nadal at the same slam, and Wawrinka did not do it back-to-back.
The Austrian has established himself as the second best clay-court player over the last two seasons, but taking the last step has so far proved beyond him.
Thiem described his last two days in a TV interview as going from heaven to hell, the 25-year-old adding: "Yesterday was one of my biggest victories in my career.
"That's a unique and also brutal thing in our sport that I won six amazing matches. I beat yesterday one of the biggest legends of our game. Not even 24 hours later, I have to step on court against another amazing legend of our game, against the best clay-court player of all time.
"That also shows how difficult nowadays it is to win a grand slam. I failed today, but my goal and my dream is still to win this tournament or to win a grand slam tournament. I will try my best next year again."