Nadal held serve to win his first game of the match to start the second set and dug deep in a grueling back-and-forth classic to advance to the semifinals, 0-6, 6-4, 7-5, 6-7, 7-6.
World number one Nadal lost the opening set 6-0 after being outpowered by the Austrian ninth seed in New York, BBC Sport reports.
"Against Rafa, I've had three very nice experiences and seven frightful experiences", said Thiem who turned 25 on Monday.
Remarkably, Thiem was the first top-20 player Nadal has faced at Flushing Meadows since his final win over Novak Djokovic in 2013.More news: Actor Burt Reynolds has died at age 82
"He's young, he has plenty of time to win big tournaments. The only thing that I was thinking was to finish this first set and forget about this start".
The two players combined for 129 winners-74 for Thiem, 55 for Nadal-and Thiem actually won six more points overall than Nadal did.
"What is important about this match is the level of tennis, the dramatic match", Nadal said. Thiem had been on the receiving end of a straight-sets defeat at the French Open final in June and he certainly did not want a repeat of that.
Thiem returned the favor, breaking Nadal again to cut the set to 5-4.More news: Osaka powers into U.S. Open semis by routing Tsurenko
Nadal was once again able to recover after going down a break, forcing the set to a tie-breaker.
"It's been a great battle, the conditions were tough, a lot of humidity". This set lasted 67 minutes but the real drama was just around the corner in set number four, with 12 break points in total and more than 80 minutes required to be completed!
Rafael Nadal vs. Dominic Thiem went on long into the small hours, with Nadal eventually prevailing in a pulsating deciding-set tiebreak. "It's just very hard to deal with. I like this feeling, but at the same time you feel exhausted after that", Nadal said.
"I don't think he's really sorry", said the 25-year-old. After saving two break points in game two, Thiem broke in the very next game after a backhand error from Rafa who had to save three break points in game five to stay in contention.
Williams, the 23-time Grand Slam champion seeking a first major since a 2017 Australian Open title won when she was pregnant with her daughter Olympia, will take on Karolina Pliskova for a semi-final spot after the eighth-seeded Czech beat Australian Ashleigh Barty 6-4, 6-4.More news: Nurse discovers her Colleague was a Preemie she Cared for in 1990 ❤