Substitute Rory Fallon headed home a dramatic winner inside the final two minutes as Swindon fought back from two goals down to complete an amazing victory at the County Ground.
Goals from defender Lee Bullen and striker Steven MacLean had put Sheffield Wednesday in control and seemingly on their way to a third away win of the season.
But Paul Sturrock's side somehow combined to concede three goals in the final 11 minutes to hand Swindon victory and leave the Wednesday manager shaking his head in disbelief at the final whistle.
Swindon midfielder Brian Howard started the comeback with a delightful chip over goalkeeper Ola Tidman on 79 minutes before striker Sam Parkin levelled the scores seven minutes later as he side-footed home Sammy Igoe's cross from the right.
But there was even more drama to follow two minutes later when Fallon, on as a 71st minute replacement for the ineffective David Duke, found himself unmarked at the far post and joyfully headed home Christian Roberts' cross from the left to send the home fans wild with delight.
Bullen had opened the scoring for Wednesday after just three minutes with a near-post header from a corner and, after striker Adam Proudlock had twice been thwarted by Swindon goalkeeper Rhys Evans, MacLean extended the advantage on 63 minutes.
The Scottish striker was unlucky to see his first effort crash against the crossbar but full-back Patrick Collins retrieved the ball on the right before centring for MacLean to convert a simple chance from six yards out.
Swindon were still celebrating Fallon's goal when MacLean had a golden opportunity to cap an amazing match by scoring an equaliser in the dying seconds, but Evans somehow blocked his shot at point-blank range to complete the home side's comeback.