UPDATE: RAFAEL Nadal began his U.S. Open quarter final as poorly as possible, shut out in a set by a 6-0 score for only the fourth time in 282 career Grand Slam matches.

On the previous three such occasions, he’d lost. On this one, he managed to come back to win, although it took 4 hours, 49 minutes and never did get easy for him.

The defending champion and No. 1 seed at Flushing Meadows recovered from his disastrous start and other stumbles along the way to beat No. 9 Dominic Thiem 0-6 6-4 7-5 6-7 (4) 7-6 (5) for a semifinal berth at a third consecutive Grand Slam tournament, winning a physical, back-and-forth tussle that concluded at 2.04 a.m. New York time.

How tense and tight was this one? Not only was Nadal two points from losing at 5-all in the closing tiebreaker, but he finished with fewer total points, 171-166.

When it ended, on an overhead by Thiem that sailed long, Nadal climbed over net to hug his opponent and whisper words of encouragement.

“I suffered, if that’s the right word, ‘’ Nadal said after the match.

“I’m very sorry for Dominic.”

“He’s a close friend on tour. He’s a great guy. A great player.” This rematch of the French Open final in June, won by Nadal, was his first match against a top-20 opponent at the U.S. Open since 2013, when he beat then-No. 1 Novak Djokovic in the final.

It sure seemed at the shocking outset as if Nadal was somehow unprepared for this step up in competition. Thiem collected 24 of the opening set’s 31 points, thanks in large part to a 13-3 edge in winners.

Hard to not think back to 24 hours earlier, when Nadal’s great rival, No. 2 seed Roger Federer, was upset in the fourth round by Australia’s John Millman during similarly muggy conditions. Nadal was sweating so much in the 90-degree heat and 50-percent humidity that a mountain of white towels formed next to his changeover bench. Thiem made him work for this win. And how.

The depth and strength of Thiem’s groundstrokes were doing what Nadal’s shots usually do to opponents: robbing them of time and space. Plus, Thiem - an Austrian who turned 25 on Monday - was serving well, taking every point when he put a first serve in, and handling returns without a hitch.

“For me, it was a very tough start,” Nadal said. “Then I tried to stay in the match, in some way.” It took a while for Nadal to figure out what was wrong and become Thiem’s equal in entertaining, body-punishing baseline exchanges that inspired loud gasps from spectators. Still, this whole contest was filled with challenges for Nadal.

He fell behind by a break in the third set before rebounding. He was two points from victory at 6-5, deuce, in the fourth as Thiem served, but flubbed a forehand volley, leaping for a ball that appeared to be sailing out and dumping it into the net. That mistake might have stayed in Nadal’s head, because he played terribly in the ensuing tiebreaker.

In the fifth, Nadal held three break points at 5-all, love-40, but Thiem took the next five points told serve.

That, Nadal would say afterward, managed to “break my heart. But I just keep going.” He usually does.

When Nadal makes it this far in New York, he usually doesn’t stumble. He has now won seven U.S. Open quarter finals in a row when he’s made it that far; his only loss in that round came back in 2006.

He is bidding for a fourth title at Flushing Meadows and 18th Grand Slam trophy overall.

On Friday, Nadal will take on a familiar foe with a berth in the final on the line: 2009 champion and No. 3 seed Juan Martin del Potro, who defeated No. 11 John Isner 6-7 (5), 6-3, 7-6 (4), 6-2.