James Collins scored an extra-time winner for Swindon to send Stoke crashing out of the League Cup.
Swindon took the lead when home keeper Thomas Sorensen dropped a cross and Collins pounced, before the same player added a second with a header.
A Kenwyne Jones header and Jon Walters shot hauled Stoke level but Aden Flint gave Swindon the edge in extra-time.
Peter Crouch nodded in another Stoke equaliser before Collins completed his hat-trick when he slid in to score.
It was a pulsating game at the Britannia Stadium and the League One side needed to show plenty of character to see off their Premier League hosts.
The visitors were given a helping hand when Sorensen, one of six Stoke changes from Sunday's draw with Arsenal, spilled a James McEveley cross to allow Collins to net his first.
Who is James Collins?
- A 21-year-old striker who was born in Coventry but has played for Republic of Ireland U21s
- Started his career at Aston Villa and had loan spells at Darlington and Burton
- Joined Shrewsbury in January 2011, scoring against Arsenal in a League Cup tie
- Joined Swindon in the summer of 2012
Raffaele De Vita crossed for Collins to head home and extend the Robins' lead, and the former Shrewsbury striker was then denied a third when he had a shot cleared off the line.
De Vita also saw an effort hit the post before the home side went into half-time and regrouped.
Revived, the Potters pulled one back when Jones headed home a Michael Kightly cross and substitute Walters then stroked home after 86 minutes to send the tie into extra-time.
The home side appeared to be getting on top but it was Swindon who regained the lead.
Joe Devera flicked on from a corner and defender Flint was at the back post to head in.
Crouch again levelled for Stoke only for Collins to get his third, and the winner, with penalties just a minute away.
Stoke boss Tony Pulis:
"I don't want to take anything away from them - I think they should celebrate the fact that they have come here and won.
"We have had a few years of being successful in cup competitions, some really good days in the cup, and they have had a good day today so let them celebrate.
"They played a major part in what was an extraordinary game at times tonight."
Swindon boss Paolo Di Canio:
"It is obvious that when you win against a side like Stoke City away from home - in a place where teams like Arsenal and Manchester United find it difficult to score even one goal and you are playing in a fortress - it is something special.
"We scored four goals and I don't want to exaggerate, but I think we created another five or six clear chances to score.
"I don't think they underestimated us and all the congratulations I received from [Stoke manager] Tony Pulis at the end of the game was special for me because he is an experienced and very good manager who has achieved fantastic things with Stoke.
- 29 Sorensen
- 02 Cameron
- 04 Huth
- 12 Wilson
- 20 Upson
- 30 Shotton (Ness - 77' )
- 07 Pennant
- 18 Whitehead
- 21 Kightly
- 09 Jones (Crouch - 77' )
- 33 Jerome (Walters - 77' )
- 27 Nash
- 17 Shawcross
- 28 Wilkinson
- 14 Ness
- 24 Delap
- 19 Walters
- 25 Crouch
- 01 Foderingham
- 03 McEveley (Thompson - 98' )
- 04 Flint
- 05 Devera
- 06 Navarro
- 10 Ritchie
- 12 McCormack Booked
- 18 Miller
- 09 Collins
- 16 Williams
- 23 De Vita (Ferry - 73' )
- 30 Bedwell
- 15 Thompson
- 32 Smith
- 07 Rooney
- 08 Ferry
- 13 Risser
- 20 Storey