Relegation strugglers Bury stunned managerless Swindon and ended the Robins' 13-match unbeaten run.
Steven Schumacher scored the only goal of the game, turning in Joe Skarz's cross to secure the Shakers their third away win of the season.
Swindon looked lost without the influence of ex-boss Paolo Di Canio and created few chances.
James Collins volleyed wide in the second half, while Aden Flint's header was well saved by keeper Trevor Carson.
At the other end, Wes Foderingham was forced in to action after Schumacher's powerful shot.
The result means Swindon slide down to fourth in League One, while Bury remain 22nd.
VIEWS FROM THE DRESSING ROOM
Swindon Town caretaker manager Tommy Miller told BBC Wiltshire:
"We were rubbish throughout. We didn't get going at all, and I include myself in this.
"You wouldn't have thought the top of the league was at stake.
"Maybe it was down to complacency because Bury are struggling and it would have been an easy three points.
"We weren't at the races and it was very disappointing."
Bury manager Kevin Blackwell told BBC Radio Manchester:
"We knew we had to be well organised because they're good going forward and they've scored a lot of goals this season.
"The players stuck to the game plan and that's what frustrates me. On Friday night after 60 minutes, we looked as though we were comfortable and then we shoot ourselves in the foot with stupid decisions.
"I feel like I should be standing here with six points but what a way to return. To come to the team second in the table and do that to them was fantastic."
Full Time The referee signals the end of the game.
Inswinging corner taken right-footed by Luke Rooney played to the near post, clearance made by Ethan Ebanks-Landell.
The referee blows for offside against Jonson Clarke-Harris. Wes Foderingham takes the indirect free kick.
Corner taken short by Steven Schumacher.
Nick Ajose fouled by Nathan Thompson, the ref awards a free kick. Direct strike on goal from the free kick comes in from Steven Schumacher, save by Wes Foderingham. Steven Schumacher decides to take a short corner.
The referee blows for offside against Jonson Clarke-Harris. Indirect free kick taken by Wes Foderingham.
The referee blows for offside against Jonson Clarke-Harris. Nathan Thompson restarts play with the free kick.
Unfair challenge on Mark Carrington by Adam Rooney results in a free kick. Trevor Carson takes the free kick.
Outswinging corner taken from the right by-line by Tommy Miller, Steven Schumacher manages to make a clearance.
Jay McEveley restarts play with the free kick.
Booking Steven Schumacher goes into the book.
Free kick awarded for a foul by Steven Schumacher on Alan McCormack.
Shot by Adam Rooney from 18 yards. Save by Trevor Carson.
Free kick taken by Nathan Thompson.
Booking The referee cautions Jonson Clarke-Harris for unsporting behaviour.
The referee blows for offside.
James Collins takes a shot. Save made by Trevor Carson.
Jay McEveley takes the indirect free kick.
Substitution Craig Fagan goes off and Jonson Clarke-Harris comes on.
Substitution Craig Jones on for Tom Soares.
David Worrall gives away a free kick for an unfair challenge on Luke Rooney.
Luke Rooney fires a strike on goal direct from the free kick, comfortable save by Trevor Carson.
Booking Mark Carrington receives a caution.
Foul by Mark Carrington on James Collins, free kick awarded.
Free kick awarded for a foul by Andy Williams on Joe Skarz. Trevor Carson takes the indirect free kick.
Substitution Luke Rooney on for Gary Roberts.
Steven Schumacher takes a shot from just outside the penalty area which clears the crossbar.
Free kick taken by Gary Roberts.
Booking Tom Soares goes into the referee's book.
Free kick awarded for an unfair challenge on Nathan Thompson by Tom Soares.
Nathan Thompson takes the indirect free kick.
Booking Booking for Craig Fagan for unsporting behaviour.
Craig Fagan concedes a free kick for a foul on Alan McCormack.
Inswinging corner taken right-footed by Tommy Miller, Mark Carrington manages to make a clearance.
Substitution Adam Rooney joins the action as a substitute, replacing Raffaele De Vita.
James Collins takes a shot from just outside the penalty area which clears the crossbar.
Joe Skarz concedes a free kick for a foul on Gary Roberts. Wes Foderingham takes the free kick.
Booking The referee books Joe Skarz for time wasting.
Substitution (Swindon) makes a substitution, with Nathan Thompson coming on for Alan Navarro.
Gary Roberts has an effort at goal from just outside the box which goes wide of the right-hand post.
Unfair challenge on Craig Fagan by Alan McCormack results in a free kick. Free kick crossed right-footed by Mark Carrington from left by-line, Aden Flint manages to make a clearance.
Craig Fagan challenges Aden Flint unfairly and gives away a free kick. Gary Roberts takes the direct free kick.
Gary Roberts takes a inswinging corner.
The referee starts the second half.
45:00 +1:23 Half time
Half Time The referee calls an end to the first half.
Tom Soares concedes a free kick for a foul on Alan McCormack. Alan McCormack takes the indirect free kick.
Corner from the left by-line taken by Tommy Miller, Aden Flint produces a header from inside the area that goes over the crossbar.
Inswinging corner taken by Gary Roberts from the right by-line.
Steven Schumacher challenges James Collins unfairly and gives away a free kick. The ball is sent over by Gary Roberts, Darren Ward has a headed effort from close range and clears the bar.
Steven Schumacher gives away a free kick for an unfair challenge on Darren Ward. Jay McEveley takes the indirect free kick.
Foul by Joe Skarz on Andy Williams, free kick awarded. Gary Roberts crosses the ball from the free kick left-footed from right wing, clearance made by Ethan Ebanks-Landell.
James Collins takes a shot from a long way out which goes wide of the right-hand upright.
Free kick awarded for an unfair challenge on Aden Flint by Craig Fagan. Indirect free kick taken by Alan McCormack.
Shot from just outside the box by Mark Carrington goes over the bar.
Unfair challenge on Mark Carrington by Alan Navarro results in a free kick. Mark Carrington restarts play with the free kick.
The assist for the goal came from Joe Skarz.
20:19 Goal scored
Goal! - Steven Schumacher - Swindon 0 - 1 Bury Steven Schumacher fires in a goal from long distance to the bottom right corner of the goal. Swindon 0-1 Bury.
Zac Thompson is flagged offside by the assistant referee. Alan McCormack takes the free kick.
Gary Roberts is penalised for handball and concedes a free kick. Free kick taken by Trevor Carson.
David Worrall challenges Raffaele De Vita unfairly and gives away a free kick. Free kick crossed right-footed by Tommy Miller from left channel, Ashley Eastham manages to make a clearance.
David Worrall produces a left-footed shot from just outside the penalty box that misses to the left of the goal.
Inswinging corner taken left-footed by Gary Roberts, Steven Schumacher manages to make a clearance.
Free kick awarded for a foul by Jay McEveley on Nick Ajose. Indirect free kick taken by Trevor Carson.
Mark Carrington gives away a free kick for an unfair challenge on Alan Navarro. Indirect free kick taken by Alan McCormack.
The referee blows for offside. Free kick taken by Trevor Carson.
Alan McCormack fouled by Steven Schumacher, the ref awards a free kick. Indirect free kick taken by Wes Foderingham.
Short corner worked by Joe Skarz.
James Collins gives away a free kick for an unfair challenge on Mark Carrington. David Worrall takes the indirect free kick.
Craig Fagan is flagged offside by the assistant referee. Wes Foderingham restarts play with the free kick.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.