Chris Dagnall scored twice as Barnsley marched into FA Cup quarter-finals at the expense of League One MK Dons.
Dagnall fired the Tykes into an early lead with a fine left-foot finish which surprised keeper David Martin.
The Championship strugglers doubled the lead through Marlon Harewood before Dean Bowditch gave the hosts hope.
Barnsley lost Kelvin Etuhu to injury, but Dagnall struck during 12 minutes of stoppage time before Dons' Alan Smith was sent off for fouling Rory Delap.
Steve ClaridgeBBC football analyst
On the evidence of what we have seen Barnsley will be staying up in the Championship. They were very good. They pressured MK Dons and were fantastic in possession. For 50-55 minutes they were different class. OK, they rode their luck a little bit after losing Kelvin Etuhu to injury but in Chris Dagnall they have a terrific finisher
Referee Mike Jones showed the former Manchester United and England player a straight red for leading with his arm, the 32-year-old's second dismissal of the season.
It capped a bitterly frustrating day for the hosts, who were eyeing another cup giant-killing to add to the scalps of Sheffield Wednesday, Queens Park Rangers and Blackburn Rovers in knockout competition this season.
But Barnsley, who have spent most of the season scrapping near the bottom of the Championship table, produced a thoroughly professional performance as they continued their rapid improvement under boss David Flitcroft.
Former Rochdale and Scunthorpe forward Dagnall gave the 2008 semi-finalists a flying start after latching onto Jacob Mellis's pass and firing an angled shot across Martin in the third minute.
It went from bad to worse for the Dons as Harewood, an FA Cup runner-up in 2006 with West Ham, added a second goal by side-footing home Scott Wiseman's 19th minute cut-back.
The tie was held up for seven minutes early in the second half following a clash of heads between Etuhu and Adam Chicksen, which left the former requiring medical attention before being carried off on a stretcher and taken to hospital.
And the disruption clearly disrupted the visitors as Bowditch kept his cool to slot past Luke Steele when he found himself one-on-one with the Tykes goalkeeper to give Karl Robinson's side renewed hope.
Steele tipped Smith's header over the bar before the wheels came off MK Dons' FA Cup adventure for another season.
Dagnall made it six goals in seven games after rounding Martin before Smith saw red.
MK Dons manager Karl Robinson:
"I didn't even know it was a foul, but you see Alan Smith going to try and compete and right away ultimately the referee thinks 'that's Alan Smith, he has tried to do him, sending off'.
"You could see it and, by the way, how quick did he go for his card? It looked like he couldn't wait to do it.
"But if he sticks to his report he will know he has made a big error. It was a very split game, they were the better team in the first half and we were better in the second half."
Barnsley manager David Flitcroft:
"The result meant everything.
"There has been so much detail and planning over a week now and we have put a lot of effort in.
Full Time The final whistle goes and the game is over.
Foul by Adam Chicksen on Jim O'Brien, free kick awarded. Tom Kennedy takes the direct free kick.
Gary MacKenzie challenges Scott Golbourne unfairly and gives away a free kick. Direct free kick taken by Scott Golbourne.
The assistant referee signals for offside against Jason Scotland. Shaun Williams takes the direct free kick.
Chris Dagnall is caught offside. Jon Otsemobor takes the indirect free kick.
Tom Kennedy takes the free kick.
90:00 +4:34 Dismissal
Dismissal Alan Smith is sent off by the referee.
Alan Smith concedes a free kick for a foul on Rory Delap.
The assist for the goal came from Jason Scotland.
90:00 +0:59 Goal scored
Goal - Chris Dagnall - MK Dons 1 - 3 Barnsley Chris Dagnall grabs a goal from inside the six-yard box high into the middle of the goal. Milton Keynes Dons 1-3 Barnsley.
The offside flag is raised against Shaun Williams. Luke Steele takes the indirect free kick.
Inswinging corner taken by Shaun Williams.
Foul by Chris Dagnall on Jon Otsemobor, free kick awarded. Free kick taken by Chris Lines.
Free kick awarded for a foul by Jason Scotland on Dean Lewington. Free kick taken by Gary MacKenzie.
The ball is delivered by Scott Golbourne, Jacob Mellis has an effort from just inside the box that misses to the left of the goal.
Corner taken by Jim O'Brien from the left by-line, Dean Lewington manages to make a clearance.
The ball is sent over by Chris Dagnall, blocked by Gary MacKenzie.
Handball decision goes against Chris Dagnall. Free kick taken by Shaun Williams.
Jason Scotland has an effort at goal from the edge of the box that misses to the right of the target.
Dean Lewington gives away a free kick for an unfair challenge on Jason Scotland. Rory Delap restarts play with the free kick.
Shaun Williams takes the inswinging corner, Alan Smith takes a shot from just inside the penalty box which clears the crossbar.
Martin Cranie concedes a free kick for a foul on Adam Chicksen. Shaun Williams produces a shot on goal direct from the free kick, Luke Steele makes a brilliant save.
The ball is crossed by David Perkins, save by David Martin.
Darren Potter challenges Jason Scotland unfairly and gives away a free kick. David Perkins takes the direct free kick.
Unfair challenge on Darren Potter by Scott Wiseman results in a free kick. Direct free kick taken by Shaun Williams.
Corner taken left-footed by Shaun Williams.
The ball is swung over by Daniel Powell, Dean Lewington takes a shot. Save by Luke Steele.
Outswinging corner taken by Dean Lewington from the left by-line, Rory Delap makes a clearance.
Adam Chicksen has a drilled shot. Blocked by David Perkins.
Dean Lewington restarts play with the free kick.
Booking Jacob Mellis goes into the book.
Free kick awarded for an unfair challenge on Darren Potter by Jacob Mellis.
Shot from just outside the box by Chris Dagnall misses to the left of the goal.
Corner taken by Shaun Williams played to the near post, save made by Luke Steele.
Free kick taken by Luke Steele.
Booking Caution for Shaun Williams.
Unfair challenge on Scott Golbourne by Shaun Williams results in a free kick.
Free kick awarded for an unfair challenge on Jim O'Brien by Adam Chicksen. Luke Steele takes the direct free kick.
Chris Dagnall challenges Luke Chadwick unfairly and gives away a free kick. Free kick taken by David Martin.
Substitution Rory Delap comes on in place of Bobby Hassell.
Corner taken left-footed by Shaun Williams, Dean Lewington produces a header from inside the area that goes over the bar.
The ball is sent over by Adam Chicksen, blocked by Scott Wiseman.
A cross is delivered by David Perkins, Dean Lewington manages to make a clearance.
Free kick awarded for a foul by Luke Chadwick on David Perkins. Tom Kennedy takes the free kick.
Substitution Chris Lines replaces Dean Bowditch.
Scott Wiseman concedes a free kick for a foul on Daniel Powell. Shaun Williams shoots direct from the free kick.
The ball is swung over by Adam Chicksen, Martin Cranie makes a clearance.
Martin Cranie fouled by Alan Smith, the ref awards a free kick. Tom Kennedy takes the free kick.
Assist by Darren Potter.
60:53 Goal scored
Goal - Dean Bowditch - MK Dons 1 - 2 Barnsley Goal scored by Dean Bowditch from deep inside the penalty area to the bottom right corner of the goal. Milton Keynes Dons 1-2 Barnsley.
Substitution Jim O'Brien joins the action as a substitute, replacing Kelvin Etuhu.
Jacob Mellis produces a right-footed shot from just outside the box that goes wide left of the target.
David Perkins takes a shot. Blocked by Gary MacKenzie.
The ball is delivered by David Perkins, David Martin makes a comfortable save.
Free kick taken by Tom Kennedy.
Booking Jon Otsemobor receives a caution.
Jon Otsemobor challenges Jason Scotland unfairly and gives away a free kick.
Free kick awarded for an unfair challenge on Alan Smith by Martin Cranie. Dean Bowditch produces a cross, Dean Lewington takes a shot. Bobby Hassell gets a block in.
Dean Bowditch takes the inswinging corner, save by Luke Steele.
Martin Cranie challenges Alan Smith unfairly and gives away a free kick. The free kick is swung in right-footed by Dean Bowditch, Dean Bowditch delivers the ball, Dean Lewington takes a shot. Blocked by Bobby Hassell.
The match restarts for the second half.
Substitution Ryan Harley leaves the field to be replaced by Adam Chicksen.
Substitution (Barnsley) makes a substitution, with Jason Scotland coming on for Marlon Harewood.
45:00 +2:48 Half time
Half Time The ref blows to end the first period.
Tom Kennedy restarts play with the free kick.
45:00 +2:22 Booking
Booking Luke Chadwick is shown a yellow card.
Luke Chadwick challenges Bobby Hassell unfairly and gives away a free kick.
Foul by Kelvin Etuhu on Shaun Williams, free kick awarded. Shaun Williams takes the free kick.
Shot by Scott Golbourne from 20 yards. Blocked by Shaun Williams.
Free kick awarded for an unfair challenge on Marlon Harewood by Shaun Williams. Tom Kennedy takes the direct free kick.
The offside flag is raised against Chris Dagnall. Gary MacKenzie restarts play with the free kick.
Jon Otsemobor produces a right-footed shot from just outside the area that goes harmlessly over the bar.
Free kick awarded for an unfair challenge on Darren Potter by Martin Cranie. Direct free kick taken by Shaun Williams.
A cross is delivered by Dean Lewington.
Corner taken by Ryan Harley from the left by-line to the near post, clearance made by Marlon Harewood.
Daniel Powell concedes a free kick for a foul on Scott Golbourne. Luke Steele restarts play with the free kick.
Corner from right by-line taken by Tom Kennedy.
The official flags Alan Smith offside. Tom Kennedy takes the free kick.
Chris Dagnall is ruled offside. Indirect free kick taken by David Martin.
Assist by Scott Wiseman.
18:03 Goal scored
Goal - Marlon Harewood - MK Dons 0 - 2 Barnsley A goal is scored by Marlon Harewood from deep inside the penalty area to the bottom left corner of the goal. Milton Keynes Dons 0-2 Barnsley.
Kelvin Etuhu takes the chance to get an effort at goal. Blocked by Shaun Williams.
Shaun Williams concedes a free kick for a foul on Marlon Harewood. Tom Kennedy takes the free kick.
Effort on goal by Chris Dagnall from inside the area goes harmlessly over the bar.
Alan Smith fouled by Martin Cranie, the ref awards a free kick. Dean Lewington restarts play with the free kick.
Unfair challenge on Scott Wiseman by Dean Bowditch results in a free kick. Luke Steele takes the free kick.
Shot from 20 yards by Dean Bowditch. Comfortable save by Luke Steele.
Chris Dagnall is caught offside. Indirect free kick taken by Gary MacKenzie.
Free kick awarded for an unfair challenge on Scott Golbourne by Daniel Powell. Tom Kennedy takes the direct free kick.
The assistant referee signals for offside against Marlon Harewood. Jon Otsemobor restarts play with the free kick.
Foul by Marlon Harewood on Gary MacKenzie, free kick awarded. Jon Otsemobor restarts play with the free kick.
Assist on the goal came from Jacob Mellis.
2:23 Goal scored
Goal - Chris Dagnall - MK Dons 0 - 1 Barnsley Chris Dagnall gets on the score sheet with a goal from inside the penalty area to the bottom right corner of the goal. Milton Keynes Dons 0-1 Barnsley.
Luke Chadwick has shot on goal from just outside the box which goes wide of the right-hand upright.
The referee gets the match started.
Live text and data provided by The Press Association
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.