Notts County hit two late goals as they came from behind to plunge Swindon deep into League One relegation danger.
The Robins were ahead at the break after Michael Rose's corner reached former County winger Matt Ritchie, who tapped in at the far post.
County levelled 12 minutes from time when sub Lee Hughes' presence foxed home keeper David Lucas, allowing Alan Judge's cross to drift straight in.
Hughes then pounced on Scott Cuthbert's mistake for an 85th minute winner.
Bottom side Swindon could be relegated on Monday if they lose to Sheffield Wednesday.
Victory for Martin Allen's men moves them four points clear of the League One danger zone.
Notts County manager Martin Allen told BBC Radio Nottingham:
"To be honest it was not a very good first half. I can't kid anybody to say I enjoyed it - I didn't. It's the first time since I've been here that we didn't get that competitive nature.
"The attitude and the jubilation amongst the players right at the end, the supporters up behind me was a magical moment. Back-to-back wins for Notts County - I don't know where it puts us in the league and to be honest I don't really care.
"All I said when I got here was that we'll have a go. There's no guarantees about getting above lines or below lines but whatever happens this team is going to have a go."
Swindon manager Paul Hart told BBC Wiltshire:
"I thought we played very well in the first half. There was only one team in it. We just needed that second goal.
"But then we just seemed to run out of legs and got a bit edgy.
"I have a decision to make (about his future) this weekend."