Juan Martin del Potro enjoyed an epic five set victory ©Getty Images

Juan Martin del Potro overcame illness and a two-set deficit to win a US Open classic against Dominic Thiem and set-up a quarter-final tie with Roger Federer.

The 24th seed, who won the American grand slam in 2009, said afterwards that he considered retiring in the second set as he struggled to cope with his Austrian opponent.

But, roared on by a raucous Argentinian crowd on the Grandstand court, he recovered and saved two match points in the fourth set before winning 1-6, 2-6, 6-1, 7-6, 6-4 in a three hour, 35 minute epic.

The 28-year-old Olympic silver medallist will now face Federer in a rematch of the 2009 final in which he secured his only grand slam title so far. 

"I played one of the epic matches of my career here at the US Open, which is my favourite tournament, in front of a great crowd," Del Potro said.

"I was thinking to retire in the middle of second set because I couldn't breathe, I couldn't move well, and Dominic was dominating the match so easy."

Federer, meanwhile, eased past Germany's Philipp Kohlschreiber 6-4, 6-2, 7-5 as he seeks to add to his Australian Open and Wimbledon successes this year. 

Roger Federer now lies in wait for Juan Martin Del Potro in the quarter-finals ©Getty Images
Roger Federer now lies in wait for Juan Martin Del Potro in the quarter-finals ©Getty Images

Russian teenager Andrey Rublev will face Rafael Nadal in the same half of the draw after stunning Belgium's David Goffin today.

The 19-year-old triumphed 7-5, 7-6, 6-3 to become the youngest man to reach the last-eight at the event since American Andy Roddick in 2001.

Nadal thrashed Ukraine's Alexandr Dolgopolov 6-2, 6-4, 6-1 elsewhere at Flushing Meadows.

Madison Keys made it four American women in the quarter-finals with victory over Elina Svitolina.

She beat the Ukrainian 7-6, 1-6, 6-4 to join compatriots Coco Vandeweghe, Venus Williams and Sloane Stephens in the last eight.

Vandeweghe beat 2015 French Open finalist Lucie Safarova 6-4, 7-6 today.

World number one Karolina Pliskova also progressed with ease.

The Czech star demolished American world number 91 Jennifer Brady 6-1, 6-0 at Arthur Ashe Stadium.

Estonia's Kaia Kanepi was another winner in the women's draw as she beat Russia's Daria Kasatkina 6-4, 6-4.