Australia's John Millman has caused a major boilover by beating five-time champion Roger Federer in the fourth round of the US Open.

Millman dropped the first set before triumphing 3-6, 7-5, 7-6 (9-7), 7-6 (7-3) to hand the 20-time major winner and world number two his earliest exit at Flushing Meadows since 2013.

The victory, completed in three hours and 34 minutes and just before 1:00am (local time), sees the world number 55 moving through to a quarter-final clash with Wimbledon champion Novak Djokovic.

"I'm probably in a little bit of disbelief," Millman said after ending Federer's 40-from-40 record against non-top 50-ranked rivals at the US Open.

"I have so much respect for Roger and everything he's done for the game.

He's been a hero of mine and today he was definitely not at his best, but I'll take it."

Federer tore through the opening set in 33 minutes and served for the second at 5-4, before Millman saved two set points to level at 5-5.

Roger Federer shows distress during his four-set loss to John Millman. ( AP: Jason DeCrow )

The 29-year-old Australian, playing his first fourth-round match at a major, eventually won the second set 7-5 and claimed the third in a tie-breaker but dropped serve to trail 4-2 in the fourth.

But Millman's fighting qualities shone through again when he immediately broke back, as the fourth set went back on serve and proceeded to another tie-breaker, which he won 7-3.

"I felt like a bit of a deer in headlights to begin with, to be honest with you," Millman said.

"The feet weren't moving. Roger had it on a string, he was manipulating me around the court.

"I got out of a tough second set and really found my feet and started to be a bit more aggressive. I started to serve really well and probably capitalised a little bit on Roger having an off service day."

John Millman shows his emotion during his match against Roger Federer. ( AP: Adam Hunger )

Federer let down by poor serve

Looking slow and tired on a sweltering night in New York, Federer double faulted 10 times.

In the fourth-set tie-breaker, he double-faulted twice in a row.

The first obvious signs of trouble for Federer came far earlier, in the second game of the second set. He started that 15-minute struggle by missing 18 of his initial 20 first serves.

While he eventually held there, he needed to save seven break points along the way. It was clear the 37-year-old Federer was not at his best.

Roger Federer prepares to make a forehand return in his fourth-round match against John Millman. ( AP: Jason DeCrow )

It is only the second time in Federer's past 14 appearances at the US Open that he has lost before the quarter-finals.

It is the first time Federer has been beaten by an Australian at a major since Pat Rafter defeated the Swiss when he was 18 and on debut at the 1999 French Open.

Nine Australians, including Nick Kyrgios in the third round of the US Open on Sunday (AEST), had fallen to Federer at majors since Rafter's triumph.

Lleyton Hewitt lost on seven occasions and Mark Philippoussis famously went down in the 2003 Wimbledon final, which was Federer's first major victory.

Djokovic advances to last eight

Djokovic had earlier sweated his way to a 6-3, 6-4, 6-3 fourth round win over Joao Sousa as the heat returned to the US Open.

The first Portuguese player to reach the fourth round of any grand slam, the 68th ranked Sousa never looked a threat to progress any further as his magical US Open run came to an end.

The biggest concern for Djokovic might well have been the conditions as the heat returned to New York after a few days of relief.

Novak Djokovic will face Millman in the quarter-finals. ( AP: Carolyn Kaster )

Through his opening-round matches, Djokovic and his play both suffered under a blazing sun and with temperatures nudging 32 degrees Celsius, the extreme conditions took a toll on 31-year-old Serb.

In the women's draw, Madison Keys eased into the quarter-finals with a 6-1, 6-3 victory over Slovakia's Dominika Cibulkova.

World number 14 Madison Keys lost last year's final to fellow American Sloane Stephens. ( AP: Carolyn Kaster )

Keys will next meet number 30 seed Carla Suarez Navarro, who handed Maria Sharapova her first loss in a night match at Flushing Meadows with a 6-4, 6-3 defeat.



Reuters/AP