Winger Matt Ritchie scored two first-half goals in a minute to help Swindon to victory at Rotherham.
His first was a left-footed volley and the second, from almost an identical spot, took a deflection on its way past Rhys Taylor.
Alex Revell, who headed just wide in the first half, closed the gap with a header from Chris Holroyd's left-wing cross after the break.
Lewis Grabban almost got the equaliser but hit the post with 17 minutes left.
VIEWS FROM THE DRESSING ROOM
Rotherham United manager Andy Scott told BBC Radio Sheffield:
"If you don't perform for 90 minutes against good sides you don't deserve anything.
"It's too easy to play well and chase a game and you've got to have some heart and desire to go and take it to them from the start.
"We had a great opportunity today, we'd done a lot of work on Swindon, went and watched them on Tuesday, they played exactly how I knew they were going to play - people behind the ball, they were going to counter attack.
"We knew we had to attack down the wings, we knew there was going to be space down the wings for our full-backs to drive into. And yet we get to 45 minutes and we haven't done it."
Swindon Town manager Paolo di Canio told BBC Wiltshire:
"Fantastic win in the way it came because in the last 20 minutes they [Rotherham] pushed hard.
"To play 40 minutes under pressure wasn't easy but they [Swindon players] have been warriors.
"This is the way to challenge for the title."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The final whistle is blown by the referee.90:00 +2:52
Inswinging corner taken by Sam Wood from the left by-line, clearance made by Paul Benson.90:00 +1:59
Johnny Mullins gives away a free kick for an unfair challenge on Matt Ritchie. Wesley Foderingham takes the free kick.90:00 +1:42
The ball is sent over by Dale Tonge, save made by Wesley Foderingham.89:36
Danny Schofield delivers the ball, Aden Flint makes a clearance. Sam Wood takes the inswinging corner, Aden Flint manages to make a clearance.89:14
Brett Williams crosses the ball, clearance made by Paul Caddis.87:37
The ball is delivered by Alessandro Cibocchi.86:09
Unfair challenge on Matt Ritchie by Sam Wood results in a free kick. Paul Caddis takes the free kick.85:18
The referee blows for offside. Rhys Taylor takes the indirect free kick.84:15 Substitution
Substitution Oliver Risser leaves the field to be replaced by Jonathan Smith.82:30
Brett Williams delivers the ball.81:19 Booking
Booking Booking for Raffaele De Vita for unsporting behaviour.80:17
Dale Tonge fouled by Raffaele De Vita, the ref awards a free kick. Free kick taken by Dale Tonge.78:52
Centre by Brett Williams, Shot on goal by Alex Revell from inside the box goes harmlessly over the target.77:48
Chris Holroyd fouled by Oliver Risser, the ref awards a free kick. Jason Taylor takes the indirect free kick.77:00 Substitution
Substitution Alessandro Cibocchi comes on in place of Callum Kennedy.75:25
Centre by Brett Williams, Aden Flint manages to make a clearance.74:21
The ball is sent over by Brett Williams, Chris Holroyd produces a header from deep inside the six-yard box that clears the bar.73:38
Oliver Risser concedes a free kick for a foul on Jason Taylor. Jason Taylor takes the direct free kick.71:56
Dale Tonge sends in a cross, clearance made by Aden Flint. Corner taken left-footed by Sam Wood from the right by-line, Lewis Grabban has an effort at goal from the edge of the area striking the post.
Brett Williams sends in a cross, clearance made by Aden Flint.70:28
Unfair challenge on Matt Ritchie by Sam Wood results in a free kick. Direct free kick taken by Paul Caddis.68:53
Corner from left by-line taken by Paul Benson.66:24
Rhys Taylor restarts play with the free kick.66:24 Substitution
Substitution Ronan Murray joins the action as a substitute, replacing Billy Bodin.66:24
The referee blows for offside against Matt Ritchie.65:03
Free kick awarded for a foul by Raffaele De Vita on Dale Tonge. Indirect free kick taken by Dale Tonge.63:50
Foul by Raffaele De Vita on Dale Tonge, free kick awarded. Rhys Taylor takes the free kick.62:50
Dale Tonge crosses the ball, save by Wesley Foderingham.60:46
The referee blows for offside against Billy Bodin. Rhys Taylor takes the indirect free kick.59:45
Centre by Matt Ritchie, save made by Rhys Taylor.57:22
Dale Tonge delivers the ball, Matt Ritchie makes a clearance.56:14
Sam Wood delivers the ball, clearance made by Callum Kennedy.55:35 Substitution
Substitution Brett Williams comes on in place of Gareth Evans.53:20
The assist for the goal came from Chris Holroyd.53:20 Goal scored
Goal! - Alex Revell - Rotherham 1 - 2 Swindon Alex Revell finds the back of the net with a headed goal from deep inside the penalty area. Rotherham 1-2 Swindon.53:17
A cross is delivered by Chris Holroyd,50:49
Matt Ritchie takes a short corner.47:55
The ball is crossed by Paul Benson, save by Rhys Taylor. Corner taken by Sam Wood, Headed effort from deep inside the penalty area by Alex Revell misses to the right of the target.47:12
Lewis Grabban sends in a cross, clearance by Aden Flint. Danny Schofield produces a left-footed shot from outside the penalty box and misses left.46:31
Matt Ritchie crosses the ball, clearance made by Michael Raynes.45:01
The referee starts the second half.45:00 +2:16 Half time
Half Time The ref blows to end the first period.44:22
Aden Flint takes the indirect free kick.44:22 Booking
Booking Booking for Gareth Evans for unsporting behaviour.44:07
Foul by Gareth Evans on Oliver Risser, free kick awarded.43:06
Short corner taken by Raffaele De Vita.41:30
The ball is crossed by Callum Kennedy, Effort from the edge of the area by Billy Bodin goes wide of the right-hand post.37:07
Unfair challenge on Sam Wood by Paul Benson results in a free kick. Free kick taken by Rhys Taylor.36:33
Centre by Lewis Grabban.36:03
The ball is crossed by Gareth Evans, save by Wesley Foderingham.34:58
Long range shot from Oliver Risser misses to the left of the goal.34:46
The ball is crossed by Paul Caddis, clearance made by Michael Raynes.33:39
Free kick awarded for a foul by Gareth Evans on Paul Caddis. Indirect free kick taken by Aden Flint.32:09
Chris Holroyd is caught offside. Indirect free kick taken by Wesley Foderingham.32:01
Sam Wood crosses the ball, clearance made by Joe Devera.29:28
The ball is swung over by Paul Benson, save made by Rhys Taylor.28:59
The referee penalises Raffaele De Vita for handball. Dale Tonge restarts play with the free kick.28:07
The offside flag is raised against Simon Ferry. Rhys Taylor takes the indirect free kick.26:50
A cross is delivered by Gareth Evans.25:58
The ball is sent over by Danny Schofield, clearance by Joe Devera. Corner taken right-footed by Gareth Evans, clearance made by Aden Flint.25:00
Inswinging corner taken right-footed by Matt Ritchie, Michael Raynes manages to make a clearance.23:53
Billy Bodin concedes a free kick for a foul on Dale Tonge. Rhys Taylor takes the free kick.23:02
Paul Caddis has a shot on goal from outside the area which misses right.21:34
Free kick awarded for an unfair challenge on Oliver Risser by Michael Raynes. Paul Caddis shoots direct from the free kick, save made by Rhys Taylor.19:34 Goal scored
Goal! - Matt Ritchie - Rotherham 0 - 2 Swindon Matt Ritchie gets on the score sheet with a goal from outside the penalty box to the top right corner of the goal. Rotherham 0-2 Swindon.18:12 Goal scored
Goal! - Matt Ritchie - Rotherham 0 - 1 Swindon A goal is scored by Matt Ritchie from outside the area to the bottom right corner of the goal. Rotherham 0-1 Swindon.15:22
The ball is sent over by Paul Caddis, Paul Benson takes a shot. Save by Rhys Taylor. Inswinging corner taken left-footed by Raffaele De Vita from the right by-line.14:32
The ball is swung over by Danny Schofield, save by Wesley Foderingham.13:50
Billy Bodin gives away a free kick for an unfair challenge on Jason Taylor. Rhys Taylor takes the free kick.12:45
Chris Holroyd takes a shot from inside the box clearing the bar.11:36
Shot from just outside the box by Jason Taylor goes over the crossbar.11:28
The ball is swung over by Dale Tonge, Joe Devera manages to make a clearance.11:04
Billy Bodin concedes a free kick for a foul on Jason Taylor. Johnny Mullins restarts play with the free kick.7:05
Unfair challenge on Sam Wood by Matt Ritchie results in a free kick. Free kick crossed by Sam Wood, clearance made by Aden Flint.6:49
Billy Bodin takes a shot. Save by Rhys Taylor.5:34
Chris Holroyd takes a shot. Blocked by Joe Devera.5:13
Gareth Evans delivers the ball, clearance by Oliver Risser. The ball is delivered by Johnny Mullins, Joe Devera makes a clearance.3:44
The ball is swung over by Paul Caddis, save made by Rhys Taylor.3:22
A cross is delivered by Oliver Risser, Sam Wood makes a clearance.1:43
Oliver Risser fouled by Jason Taylor, the ref awards a free kick. Shot comes in from Callum Kennedy from the free kick, Michael Raynes gets a block in.1:16
The ball is delivered by Paul Caddis, clearance made by Michael Raynes.0:00
The referee gets the game underway.
Live data and text provided by our data suppliers