NEW YORK (Reuters) - Roger Federer’s hopes of claiming a record-extending 20th grand slam title ended on Wednesday when he was beaten 7-5 3-6 7-6(8) 6-4 by Juan Martin del Potro in a thrilling U.S. Open quarter-final.

Sep 6, 2017; New York, NY, USA; Roger Federer of Switzerland leaves the court after losing to Juan Martin del Potro of Argentina on day ten of the U.S. Open tennis tournament at USTA Billie Jean King National Tennis Center. Mandatory Credit: Robert Deutsch-USA TODAY Sports

Del Potro, who swept aside Federer in the 2009 final at Flushing Meadows, now faces world number one Rafa Nadal, denying fans a potential first encounter between the Swiss maestro and Spaniard in New York.

Federer had predicted that he would need to overcome Del Potro’s serve, forehand and fighting spirit to advance to the semi-finals.

On Wednesday, he was dead right.

Del Potro hit huge forehands, big serves and stayed focused when Federer seemed to be back in control in a one-sided second set.

“I think I played my best match of the tournament, I did everything well,” said the 24th seeded Argentine. “I served so good, I hit my forehand as hard as I could and I think we played a great match and I think I deserved to win.”

Del Potro enjoyed strong support from the sold-out 23,771 crowd on Arthur Ashe under the lights, with a spine-chilling roar welcoming his victory.

“I think it’s my homecourt, too, you make me feel happy everytime I play here and I love your support guys. I love to see you cheer for me,” he told the crowd.

“After all my injuries and surgeries ... New York is my favourite tournament, my favourite city to play tennis.”

Slideshow ( 5 images )

Federer had tried to stay away from Del Potro’s lethal forehand throughout the match, but with the Argentine’s first-serve percentage at 79 in the first set, he had no chance to break.

With the Swiss struggling with his own serve, the lanky Argentine had one opportunity at 5-5 when the Swiss hit a double fault and then punished him with a splendid forehand passing shot.

He sealed the opening set in the next game with another a big forehand winner.

WASTED OPPORTUNITIES

Federer, who has been hampered by back problems, barely sat during the period between sets, and he broke for 3-1 with a forehand passing shot as Del Potro started to struggle with his first serve and the Swiss effortlessly claimed the set.

The momentum shifted again, however, and Federer dropped his serve in the second game of the third set when he served another double fault.

He saved another break point in the fourth game, setting up one for himself in the seventh, which Del Potro gave away with a double fault.

The set went into a tiebreak and Federer moved 6-4 up to earn two set points but Del Potro saved them with a stunning service return on the baseline and a mighty serve.

A Del Potro double fault gave the Swiss another chance but he made a mess of a backhand half volley and on the fourth set point, the Argentine stayed in contention thanks to a forehand winner.

It was then the Argentine who had a set point on Federer’s serve, did not flinch, returning brilliantly again to force the Swiss to hit a volley long. Del Potro then broke for 3-2 with a jaw-dropping crosscourt backhand winner.

Federer was on the brink of defeat when he trailed 0-30 on his serve at 5-3 and while he regained his composure to win the game the momentum had shifted and Del Potro clinched the match with yet another forehand winner in the next game.