Roger Federer has been knocked out of the US Open in the fourth round by world number 55 John Millman.
The 37-year-old Swiss had prioritised winning a sixth title at Flushing Meadows but was beaten 3-6 7-5 7-6 (9-7) 7-6 (7-3) in three hours 35 minutes.
It is the first time Federer has lost to a player ranked outside of the top 50 at the US Open.
Australian Millman will play two-time champion Novak Djokovic in his first Grand Slam quarter-final on Wednesday,
Second seed Federer, bidding for a record-extending 21st Grand Slam, missed set points in the second and third sets before capitulating in the fourth-set tie-break.
Millman, 29, had never beaten a top-10 player before but suddenly found himself with five match points against arguably the greatest male player of all-time.
After Federer rallied to save two of the them, Millman completed victory at almost 01:00 local time in New York when the out-of-sorts Swiss lumped a forehand long.
It was Federer’s first defeat in 41 matches at the US Open against a player ranked outside the top 50.
“It was very hot and one of those nights where I felt I couldn’t get air,” he said.
“I just struggled in the conditions and it was one of the first times it has happened to me.
“You just keep sweating and lose energy. At some point I was just happy the match was over.”