World number one Ashleigh Barty fell in the US Open third round after Shelby Rogers produced a superb comeback in front of a raucous New York crowd.
Wimbledon champion Barty held a 5-2 lead in the final set and twice served for the match but home favourite Rogers battled her way back into contention.
The world number 43 then came through the resulting tie-break to stun the top seed 6-2 1-6 7-6 (7-5).
She will face British teenager Emma Raducanu next.
Barty was devoid of rhythm in the first set but seemed to have found, if not her best form, enough to take her into the fourth round.
However, Rogers, helped by the crowd, pulled off a remarkable show of shot-making to beat Barty for the first time in six attempts.
It is just Barty’s eighth loss of what has been a sterling season.
“You guys are in control of the tournament,” Rogers told the crowd.
“You were awesome and I didn’t want to leave. I just wanted to make balls and stay in the match
Barty had done all the hard work, overcoming a sluggish start to take control of the match, but her form once again deserted her as she served for a place in the last 16.
Despite having the double break cushion, Barty looked tight as she first served for the match, and a netted forehand that handed Rogers the break prompted a loud “come on” from her opponent and the crowd.
Rogers gestured for the crowd to make more noise and they responded, helped by her fending off Barty in her own service game from 30-30, and the American quickly creating another break-point opportunity in the next.
A trademark forehand from Barty kept her in the game but Rogers, out of nowhere, lifted her level, and she was roared on by the crowd as she clawed her way to 5-5.
The tie-break was a nervy affair at first, both players missing routine shots as they tried to end the points quickly, but it was Barty who blinked first.
The two players shared a warm word and hug at the net before a tearful Rogers soaked in the atmosphere and cheers from the crowd.
Barty is a pragmatic character but she will know that she had this match on her racquet.
“It’s never nice when you have a couple of opportunities to serve out a match and can’t get it done,” Barty said. “Six in the third is brutal. It’s a tough one to swallow.
“I found a way to really turn it in my favour and just wasn’t able to just quite finish off. It’s disappointing, but we’ll move on.”
Barty too had warm support from the crowd as she recovered from a poor start that saw her serve four double faults to go an early break down in the opening set.
The Australian could not find her radar, her forehand in particular looking off, and she finished the first set with 17 unforced errors, compared to just seven winners.
Although she forced herself back into some form, Rogers’ resilience – and the Arthur Ashe crowd – proved a step too far for Barty.
“[It’s] not a match I’ll dwell on for too long in the sense that there are so many ‘what ifs’. Millimetres could have changed things,” Barty said.
“You accept that in tennis. I just didn’t quite have enough, physically or mentally, in the tank. But that’s OK. I’ll sleep well tonight knowing I gave everything I could. It just wasn’t quite enough.
“I feel like the Slams, you’re kind of building up to it and afterwards there’s a reset. We reset now. We go back to the drawing board, work out what we want to do for the rest of the season.”
Earlier, 2019 champion Bianca Andreescu needed just 67 minutes to sweep aside lucky loser Greet Minnen and reach the US Open fourth round.
The Canadian sixth seed, who is finding her way back from a long-term knee injury, beat the Belgian 6-1 6-2.
The 21-year-old has now won her past 10 main draw matches in New York.
She faces an intriguing last-16 match against French Open semi-finalist Maria Sakkari after the Greek beat a patchy Petra Kvitova 6-4 6-3.
Czech 10th seed Kvitova made 34 unforced errors compared to just 16 winners as she struggled for consistency.
Sakkari and Andreescu last met at the Miami Open in April, with Canadian edging a third set tie-break in a match that finished at 01:30 local time.
Wimbledon finalist Karolina Pliskova made light work of her meeting with Australia’s Ajla Tomljanovic.
The Czech fourth seed, a runner-up at Flushing Meadows in 2016, took just over an hour to win 6-3 6-2.
Olympic gold medallist Belinda Bencic also advanced to the fourth round with a 6-2 6-4 win over American Jessica Pegula.
Switzerland’s Bencic last year’s French Open champion Iga Swiatek next after the Pole beat Anett Kontaveit 6-3 4-6 6-3.
Swiatek is the only WTA player to have reached the second week of each Grand Slam in 2021.