Barnsley striker Jason Scotland scored a late winner as Middlesbrough's dismal start to 2013 continued.
The visitors had taken an early lead through Jim O'Brien, before Boro responded in the second half through Mustapha Carayol and Curtis Main.
Barnsley were not to be denied, however, and Scott Golbourne equalised before Scotland sealed the points with his third goal in as many games.
Tony Mowbray's side have now lost all five of their league outings in 2013.
The Middlesbrough manager had called for his team to go back to basics after the 4-0 trouncing at Ipswich - but his side looked bereft of ideas for long spells in front of a disgruntled crowd at the Riverside Stadium and Barnsley were good value for a sixth win in seven games.
It was a result that sees Barnsley edge further away from the relegation zone having caught Middlesbrough cold with an early goal.
O'Brien gathered the ball in the right channel and his speculative effort from the edge of the box took a wicked deflection off George Friend and loop over Middlesbrough goalkeeper Jason Steele.
The hosts had to wait until five minutes into the second half to draw level.
Emmanuel Ledesma's through-ball allowed Gambian Carayol to pounce after an effort was parried. Middlesbrough added a second 12 minutes later as substitute Main bundled home Seb Hines' cross at the back post.
But Barnsley came storming back, levelling through Golbourne before snatching the lead when Jason Steele handled a back-pass just outside the right-hand corner of his six-yard box.
Golbourne laid the indirect free-kick off for substitute Scotland, who rifled his effort in off the underside of the bar to claim victory.
Barnsley manager David Flitcroft: 'We've achieved nothing. It's got to be 46 games and this group of players will not get carried away.
"I don't do people who come to work to be average - I do people who come to work to achieve, whoever that person is.
"I'm telling this group to become heroes and achieve something that at one stage looked impossible and gets talked about for years to come.
"(Former Barnsley boss) Keith Hill's assembled an incredible squad - his recruitment is amongst the best in the country. Fortunately now we're getting the best out of them."
Middlesbrough manager Tony Mowbray: "Managers at the bottom end of the table normally come in and complain about things going against them - deflected goals and a bit of bad luck - I feel a bit like that at the moment.
"It was a kick in the teeth after five minutes with the huge deflected goal.
"I can't question their commitment to win the game; I can feel their frustration in the dressing room at the end. We've given everything we can to try and change it around.
"How do you get out of it? You stick together, you work hard, and you try to do the right things every day. You have to keep going."
- 01 Steele
- 03 Bikey
- 04 Friend
- 14 Williams Booked
- 15 Hines Booked
- 07 Leadbitter
- 10 Bailey
- 12 Dyer (Zemmama - 79' )
- 11 Ledesma (Halliday - 79' )
- 17 Jutkiewicz (Main - 46' )
- 19 Carayol
- 32 Leutwiler
- 21 Parnaby
- 05 Zemmama
- 16 McEachran
- 18 Halliday
- 33 Smallwood
- 23 Main
- 01 Steele
- 03 Golbourne
- 06 Foster Booked
- 25 Cranie
- 33 Kennedy
- 05 Delap
- 08 O'Brien (Scotland - 63' )
- 11 Perkins
- 13 Dagnall (Hassell - 79' )
- 16 Harewood (O'Grady - 63' )
- 23 Etuhu Booked
- 12 Alnwick
- 02 Hassell
- 14 Wiseman
- 19 Cywka
- 21 Mellis
- 09 Scotland
- 27 O'Grady
Live Text Commentary
Full Time The referee brings the game to a close.90:00 +4:32
Outswinging corner taken from the right by-line by Grant Leadbitter.90:00 +3:34
David Perkins challenges Rhys Williams unfairly and gives away a free kick. Grant Leadbitter takes the free kick.90:00 +1:26
Free kick awarded for an unfair challenge on David Perkins by Rhys Williams. Free kick taken by Tom Kennedy.89:49
Chris O'Grady challenges Andre Bikey unfairly and gives away a free kick. Andre Bikey takes the indirect free kick.89:00
Corner taken short by Tom Kennedy.88:23
Free kick awarded for a foul by Nicky Bailey on Chris O'Grady. Bobby Hassell takes the free kick.87:06
The assistant referee signals for offside against Chris O'Grady. Direct free kick taken by Seb Hines.81:43 Booking
Booking The referee books Rhys Williams for unsporting behaviour.81:24
Unfair challenge on Tom Kennedy by Rhys Williams results in a free kick. Tom Kennedy restarts play with the free kick.80:27
The assistant referee flags for offside against Jason Scotland. Jason Steele takes the direct free kick.78:39 Substitution
Substitution Andrew Halliday replaces Emmanuel Ledesma.78:39 Substitution
Substitution (Middlesbrough) makes a substitution, with Merouane Zemmama coming on for Kieron Dyer.78:39 Substitution
Substitution Bobby Hassell is brought on as a substitute for Chris Dagnall.76:00
Corner taken right-footed by Tom Kennedy.75:33
The assist for the goal came from Scott Golbourne.75:33 Goal scored
Goal! - Jason Scotland - Middlesbro 2 - 3 Barnsley Jason Scotland scores a goal from close range to the top right corner of the goal. Middlesbrough 2-3 Barnsley.72:41
Chris O'Grady is ruled offside. Free kick taken by Andre Bikey.71:49
Inswinging corner taken from the left by-line by Grant Leadbitter.71:11 Booking
Booking Kelvin Etuhu is given a yellow card.
The assist for the goal came from Rory Delap.69:04 Goal scored
Goal! - Scott Golbourne - Middlesbro 2 - 2 Barnsley A goal is scored by Scott Golbourne from deep inside the penalty area high into the middle of the goal. Middlesbrough 2-2 Barnsley.66:31
The assistant referee flags for offside against Chris O'Grady. Direct free kick taken by Jason Steele.65:59 Booking
Booking Seb Hines goes into the referee's book for unsporting behaviour.65:47
Free kick awarded for a foul by Seb Hines on Chris Dagnall. Tom Kennedy takes the free kick.61:31 Substitution
Substitution Jason Scotland comes on in place of Jim O'Brien.61:31 Substitution
Substitution Marlon Harewood leaves the field to be replaced by Chris O'Grady.61:31 Goal scored
Goal! - Curtis Main - Middlesbro 2 - 1 Barnsley Curtis Main grabs a headed goal from just inside the penalty box. Middlesbrough 2-1 Barnsley.56:59
Unfair challenge on David Perkins by Grant Leadbitter results in a free kick. Direct free kick taken by Tom Kennedy.54:12
Unfair challenge on David Perkins by Curtis Main results in a free kick. Jim O'Brien restarts play with the free kick.53:24
Curtis Main concedes a free kick for a foul on Martin Cranie. Luke Steele takes the direct free kick.52:34
Shot from just outside the area by Mustapha Carayol misses to the left of the target.49:27 Goal scored
Goal! - Mustapha Carayol - Middlesbro 1 - 1 Barnsley Mustapha Carayol fires in a goal from inside the box to the bottom left corner of the goal. Middlesbrough 1-1 Barnsley.48:42
Andre Bikey is flagged offside by the assistant referee. Luke Steele takes the indirect free kick.48:10
Rory Delap concedes a free kick for a foul on Mustapha Carayol. Emmanuel Ledesma restarts play with the free kick.46:28 Booking
Booking Stephen Foster receives a yellow card.46:12
Stephen Foster concedes a free kick for a foul on Mustapha Carayol. Grant Leadbitter takes the free kick.45:01
The game restarts for the second half.45:01 Substitution
Substitution Curtis Main joins the action as a substitute, replacing Lukas Jutkiewicz.45:00 +1:09 Half time
Half Time It is the end of the first-half.44:25
Shot by Lukas Jutkiewicz from deep inside the penalty area misses to the left of the target.43:52
Andre Bikey takes a shot. Save by Luke Steele.42:49
Free kick awarded for a foul by Nicky Bailey on Stephen Foster. Free kick taken by David Perkins.42:10
Short corner worked by Tom Kennedy, save by Jason Steele.41:52
Marlon Harewood takes a shot. Save made by Jason Steele.41:18
Emmanuel Ledesma takes a shot. Luke Steele makes a save.39:36
Andre Bikey fouled by Marlon Harewood, the ref awards a free kick. Indirect free kick taken by Nicky Bailey.38:17
The referee gives a free kick against David Perkins for handball. Nicky Bailey takes the free kick.35:50
Inswinging corner taken right-footed by Jim O'Brien, save by Jason Steele.33:43
The ball is sent over by Jim O'Brien, save made by Jason Steele.33:17
Foul by Stephen Foster on Nicky Bailey, free kick awarded. Nicky Bailey takes the indirect free kick.32:36
Inswinging corner taken from the left by-line by Jim O'Brien.31:18
Stephen Foster is flagged offside by the assistant referee. Jason Steele takes the direct free kick.30:49
Rhys Williams concedes a free kick for a foul on Scott Golbourne. Tom Kennedy restarts play with the free kick.28:09
Marlon Harewood challenges George Friend unfairly and gives away a free kick. Grant Leadbitter takes the direct free kick.26:39
Mustapha Carayol delivers the ball.25:20
Unfair challenge on Rhys Williams by Chris Dagnall results in a free kick. Jason Steele takes the direct free kick.24:36
Nicky Bailey gives away a free kick for an unfair challenge on Marlon Harewood. Tom Kennedy restarts play with the free kick.20:25
Chris Dagnall is flagged offside by the assistant referee. Free kick taken by George Friend.17:41
The referee blows for offside against Marlon Harewood. Jason Steele restarts play with the free kick.15:17
Marlon Harewood takes a shot. Save made by Jason Steele.13:43
Effort from deep inside the area by Emmanuel Ledesma misses to the left of the goal.13:05
Inswinging corner taken right-footed by Grant Leadbitter, save made by Luke Steele.12:16
Martin Cranie gives away a free kick for an unfair challenge on Lukas Jutkiewicz. Emmanuel Ledesma takes the free kick.9:55
Unfair challenge on Emmanuel Ledesma by David Perkins results in a free kick. Emmanuel Ledesma takes the indirect free kick.8:46
The assistant referee flags for offside against Marlon Harewood. Free kick taken by Jason Steele.7:17
Unfair challenge on Scott Golbourne by Nicky Bailey results in a free kick. Indirect free kick taken by Scott Golbourne.5:36
Assist on the goal came from Chris Dagnall.5:36 Goal scored
Goal! - Jim O'Brien - Middlesbro 0 - 1 Barnsley A goal is scored by Jim O'Brien from the edge of the area to the top left corner of the goal. Middlesbrough 0-1 Barnsley.0:46
The ball is crossed by Kieron Dyer. Corner taken short by Emmanuel Ledesma.0:00
The game gets underway.
Live data and text provided by our data suppliers