(CNN)Five-time champion Roger Federer crashed out of the 2018 US Open in a stunning fourth-round loss to Australian John Millman.
The Swiss, who last won the tournament in 2008, went down 3-6 7-5 7-6 (9-7) 7-6 (7-3) to the world No. 55 in three hours and 34 minutes.
The out-of-sorts Federer failed to convert set points in the second and third sets before faltering again in the fourth.
Two Federer double faults put his opponent 4-1 up in the tie-break and an overcooked Federer forehand secured a memorable win for the 29-year-old Millman, who will next play Wimbledon champion Novak Djokovic in the quarterfinals.
It is the first time Federer, who has only failed to reach the quarterfinals of a grand slam on seven occasions, has lost to a player ranked outside the top 50 at the US Open.
"It was very hot, one of those nights where I felt I couldn't get air," Federer, who made 77 unforced errors in the match, told reporters.
"There was no circulation at all. For some reason, I struggled in the conditions. It's one of the first times it's happened to me. I do believe since the roof is on that there is no air circulation in the stadium. That makes it a totally different US Open.
"But John was able to deal with it better. He comes from maybe one of the most humid places on earth, Brisbane. I knew I was in for a tough one. I was just happy that the match was over."
Until Monday night, Federer had been 40-0 against opponents outside the top 50 at the US Open.
Leading up to this match, the 37-year-old had displayed his usual dominance, swatting aside Japan's Yoshihito Nishioka, France's Benoit Paire and Millman's compatriot, the 30th seeded Nick Kyrgios, in straight sets.
But an anticipated quarterfinal tie against old rival Djokovic, which would have been their 47th meeting and seventh at the US Open, was scuppered by Millman, who will now meet the Serb Thursday.
"I have so much respect for Roger and what he has done for the game," said Millman during a courtside interview.
"He definitely was not at his best, but I'll take it. I felt like a deer in the headlights at the beginning, to be honest with you. Roger h