Del Potro overcame illness and a two-set deficit for the first time at a major to wear Thiem down 1-6, 2-6, 6-1 7-6 (7-1), 6-4 after three hours and 35 minutes.
In inflicting Thiem with his first loss from two sets up at a slam, Del Potro proved that it's not just his deadly forehand but arguably the biggest heart in tennis that threatens to bring Federer unstuck once again.
"I took all that energy to change in a good way and think about [fighting] and not [retiring]," the 24th-seeded Argentine said. "Unbelievable atmosphere."
Del Potro long has been popular, but became even more so since returning from three operations on his left wrist that kept him out of Grand Slam action for two years and sent his ranking out of the top 100.
"He was gone for so long that it's just really nice to see him back playing these kind of matches," Federer said. "That's what he came back for, to get crowd support the way he got it."
Winding the clock back a decade, 36-year-old Federer and 31-year-old Nadal have won the year's first three grand slam crowns and are heavy favourites to complete the sweep in New York.
Incredibly, though, their compelling 37-match rivalry has never reached Flushing Meadows.
Both living legends are again looking in ominous touch.
The only bit of intrigue came after the second set, when Federer went off the court for a medical timeout. He said afterward it was so he could get a massage after feeling a muscle tightening at the top of the back of his left leg.
His back had been bothering Federer before the US Open and restricted his practice time, something he blamed for problems while getting pushed to five sets in each of the first two rounds last week. But the lopsided win against Kohlschreiber was Federer's second in a row in straight sets.
Top-ranked Nadal is into the last eight for the first time since 2013, when the Spaniard went on to defeat Novak Djokovic in the final.
The top-seeded woman had even less trouble than Nadal did: 2016 runner-up Karolina Pliskova beat 91st-ranked American Jennifer Brady 6-1, 6-0. American CoCo Vandeweghe, beat Lucie Safarova 6-4, 7-6 (2). Fellow American Madison Keys grabbed the last four games to eliminate fourth seed Elina Svitolina 7-6 (7-2) 1-6 6-4 meaning there four US women are in the last eight for the first time in 15 years after Venus Williams and Sloane Stephens had previously advanced.
Estonia's Kaia Kanepi, who beat Daria Kasatkina 6-4, 6-4, became the first qualifier in 36 years to reach the US Open women's quarter-finals.
The 32-year-old Estonian is ranked 418th after missing much of the past two years with problems in the soles of both feet and a virus known as a precursor to mononucleosis.
- AAP, AP