At one point it looked like Nadal with cruise to a straight sets victory over Basilashvili but the Georgian fought back with huge seal to force the top seed to show his best self to eke out a victory.
When asked if he suffered during the match, Nadal said: "That's the right word".
It was world number 37 Basilashvili's strength, however, which proved his undoing.
He also broke the tall South African's serve three times and made only 13 unforced errors, compared to Anderson's 27.
Trump Calls New Book by Watergate Reporter a 'Con'
Dunford Jr., the chairman of the Joint Chiefs of Staff, among others, Trump lashed out at a vocal critic, Sen. Tonight, the White House said the excerpts were a fabrication by disgruntled former staff members.
In the fourth set, Thiem once again took control early, breaking Nadal to take a 2-1 lead.
But Basilashvili stunned Nadal in the third set tie-break and even retrieved a break for 3-3 in the fourth set before Nadal's greater composure paid off.
Although this is Thiem's first quarter-final appearance in a Major that is not the French Open, for Nadal, the surface hardly matters and he is expecting a stiff challenge from the world No. 9. The sixth seed had dropped sets in the opening two rounds against Marton Fucsovics and Tennys Sandgren, but there were no slip-ups in the third round as he saved all of the five break points he faced.
Nadal was more generous in describing his matches against Thiem, the first of which came back in 2014.
The three-time US Open champion cruised into a two-set lead in little over an hour - ominous signs for Basilashvili, who had won one game against Nadal in their only previous meeting at the 2017 French Open. But Thiem saved all three break points before denying Nadal a fourth opportunity with a stunning volley at the end of a remarkable point. "It's a dream coming true".
Colin Kaepernick Joins Nike’s 30th Anniversary ‘Just Do It’ Campaign
Kaepernick began his kneeling during the national anthem in the 2016 season and was not with an NFL team previous year . Burbank. " Nike has always been and will continue to be my family's favorite shoe", wrote Twitter user @TheDionneMama.
"Last year I was almost one point away from doing that too", said Nadal, referring to his close five-setter with Gilles Muller in the Wimbledon fourth round last season.
Nadal and Thiem have met ten times so far on Tour, and, remarkably, all have been contested on clay courts. The Canadian could only convert two of nine break points.
"I'm very sorry for Dominic", Nadal told a rowdy crowd in Arthur Ashe Stadium.
Kevin Anderson won't get a second shot at Rafael Nadal in the U.S. Open.
Nadal has lots of respect for Thiem, he is the only one who has managed to trouble the Spaniard on clay in the past two seasons. It worked out, so I thought why not on hard court? He is also the top seed at the US Open. "I need to play my best match of the tournament if I want to keep having chances to stay in the tournament". He made life pretty hard for me.
Nishikori advances as Federer, Djokovic eye quarter-final clash
A universally popular player who has built a successful career, despite several serious injury setbacks, on never giving an inch. Nishikori was glad he didn't need more than three sets in the blazing sunshine on Louis Armstrong Stadium.
"Of course it's disappointing", Anderson said. He was agonizingly close to getting there a year ago at the U.S. Open, leading by two sets against Juan Martin del Potro in the round of 16 before the 2009 champion roared back to win. He looked done from the start, losing 16 of the first 21 points in a set that took only 24 minutes for Thiem to claim.