Barnsley marched on to a sixth straight Sky Bet League One victory thanks to Sam Winnall’s dramatic 89th-minute strike.
In-form hit-man Winnall pounced from seven yards to settle an entertaining clash, drilling home after meeting sub Josh Scowen’s pinpoint cross.
The Reds enjoyed much the better of the first period at the County Ground.
Man of the moment Winnall saw an early strike from distance drift narrowly wide, while Marley Watkins was denied by a smart stop from ‘keeper Lawrence Vigouroux after being expertly tee’d up by Lloyd Isgrove.
At the other end, Adam Davies came to the Reds’ rescue when he thwarted the on-rushing Nicky Ajose.
Conor Hourihane went close with a couple of free-kick attempts from outside the box.
The influential midfielder then raced clear of the Swindon back-line in first-half stoppage-time, only to be denied by a great stop from the alert Vigouroux.
There was a lively start to the second period, with Winnall heading a rebound just wide after Hourihane’s initial strike had been parried by ‘keeper Vigouroux.
The hosts then hit back with Ajose going close after meeting Yaser Kasim’s through-ball.
Reds’ ‘keeper Davies was in great nick just before the hour mark, superbly beating away a powerful effort from the dangerous Obika.
Obika came closest to nicking a goal late on for Swindon when he headed over from a great position, before Winnall completed his heroics.
Swindon Town (4-4-2): Vigouroux; Barry, Branco, Turnbull, Ormonde-Ottewill; Doughty, Kasim, Robert, Thompson; Ajose, Obika.Subs: Belford, Brophy, Rodgers, Balmy, Landolo, Hylton, Smith.
Barnsley (4-4-2): Davies; Bree, Long, Mawson, G Williams; Isgrove, Brownhill, Hourihane, Watkins; Fletcher, Winnall. Subs: Townsend, McCourt, Roberts, Khan, Scowen, H White, Templeton.
Referee: Tim Robinson (West Sussex).