Rafael Nadal was presented with a threat for the first time at this year’s U.S. Open. To anyone other than the 18-time major winner, it would have been.

After dropping his first set of the tournament, Nadal snapped back into legendary form and reeled off nine straight games against former U.S. Open champion Marin Cilic en route to a 6-3, 3-6, 6-1, 6-2 fourth round win Monday night at Arthur Ashe Stadium.

The second-seeded, three-time U.S. Open champion will next face 20th-seeded Diego Schwartzman in Nadal’s 40th career major quarterfinal appearance, and ninth in Queens.

“After the second set, something needed to change,” Nadal said. “If not, I can’t win the match.”

Two sets in, the match was level but momentum screamed in Cilic’s favor. The 22nd-seeded Croatian had dominated the second set, pushing Nadal around like few players ever have. The 2014 U.S. Open champ — who beat Roger Federer in straight sets in that year’s semifinals — had the credentials to finish the job, having beaten Nadal at the 2018 Australian Open.

Then, Nadal added an hour-and-change highlight reel to his claim as one of the greatest the sport has ever seen.

After splitting the first two games of the third set, Nadal crushed his counterpart’s will, breaking a game at love with a no-look backhand slam, and a defended overhead, which set up a cross-court backhand winner springing Tiger Woods from his seat, unleashing fist pumps from afar along with the Spaniard.

“For some moments in the second set, I felt that too many points were in his hands,” Nadal said. “He was pushing me back, playing more aggressive than me. I was way back on the return and he had the right determination to hit every ball very strong. … I needed to change that. I started to return inside the court, and I think that creates a different perspective on the court.”

Nadal’s dominant run stretched into the fourth set, alternately igniting the crowd with his ever-improving serve, forehand and incomparable intensity.

“I always had a great connection with the crowd here in New York. They are very energetic, very passionate and I consider myself like this,” Nadal said. “Arthur Ashe Stadium, here in New York, night session, it’s difficult to be better.”

On the match’s penultimate point, Nadal offered a thrilling parting gift, as he chased down a ball, and wrapped it around the net post for a winner, sparking celebration from a 33-year-old who looked like he was chasing his first grand slam title.

“It was the only way to win that point,” Nadal said of the shot. “I hit it well, but to hit that spot you need some luck.”

With some luck, Nadal and Federer will each win another two matches, setting up their long-awaited — improbably and repeatedly postponed — first-ever meeting at the U.S. Open.