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.”