Goals from Bart Ogbeche and Seb Hines moved Middlesbrough up to fourth in the Championship table as Barnsley's woes on the road continued.
The home side were better throughout and were only denied a bigger scoreline by a stubborn Tykes defence.
It was an hour before Boro first broke through, with Hines heading home unmarked from a Barry Robson corner.
They made sure of the points in stoppage time when Ogbeche expertly lobbed Barnsley keeper Luke Steele.
The win means Tony Mowbray's side have now amassed 59 points from 34 games, leaving them five points off the automatic promotion places.
Barnsley, though, have now gone four away matches without earning a point and lie 16th with 43 points.
From kick-off, Boro were on the front foot with Julio Arca firing over and Lukas Jutkiewicz heading wide early on.
Soon after Jutkiewicz was in on the action again and was inches away from connecting with a Justin Hoyte cross for what would have been a certain goal.
The home attacks continued after the break and it was only a matter of time before they scored, with Hines on target.
In the final minute, Barnsley could have salvaged a point with a rare foray forward but Jason Steele dropped quickly to smother Jay McEveley's goalbound header on the line.
Two minutes into injury time, Ogbeche made sure of Boro's victory.
Middlesbrough manager Tony Mowbray:
"It was a difficult match. It's been like that for most of the season. It's torture standing there watching it and that's the Championship. No-one makes it easy for you.
"You've got to give Barnsley a lot of credit. They're a nice football team who play nice football.
"I think we're at the part of the season where we're grateful for the points. We will be better in the future."
Barnsley manager Keith Hill:
"I'm pleased with the performance, not the result. But the result wasn't decided by the opposition it was decided by individual errors by players.
"They'll be forgiven, though, because they give me everything I expect from them.
"But I can take some encouragement going into the game against Southampton [on Saturday]."
- 01 Steele
- 02 Hoyte
- 03 Bennett
- 04 Bates
- 15 Hines
- 11 Hammill (Ogbeche - 84' )
- 17 Robson Booked
- 18 Arca Booked (Haroun - 46' )
- 33 Smallwood
- 09 Emnes
- 30 Jutkiew'z Booked (Main - 46' )
- 29 McMahon
- 05 Zemmama
- 38 Haroun
- 16 Ogbeche
- 25 Main
- 01 Steele
- 06 Foster
- 14 Wiseman
- 15 McNulty
- 20 Golbourne
- 05 Doyle (Smith - 76' )
- 07 Dawson
- 10 Done
- 09 Davies
- 13 Dagnall (McEveley - 66' )
- 27 Gray (Cotterill - 84' )
- 12 Preece
- 03 McEveley
- 16 Smith
- 17 Cotterill
- 28 Tonge
Live Text Commentary
Full Time The referee signals the end of the game.90:00 +2:46 Goal scored
Goal! - Bart Ogbeche - Middlesbro 2 - 0 Barnsley Bart Ogbeche finds the net with a goal from outside the area to the bottom left corner of the goal. Middlesbrough 2-0 Barnsley.90:00 +1:48
Faris Haroun concedes a free kick for a foul on Korey Smith. Scott Golbourne takes the direct free kick.90:00 +0:35
Foul by Richard Smallwood on Jimmy McNulty, free kick awarded. David Cotterill restarts play with the free kick. Stephen Dawson delivers the ball, clearance by Barry Robson.89:29
Free kick awarded for an unfair challenge on Craig Davies by Barry Robson. David Cotterill takes the direct free kick.87:37
Outswinging corner taken right-footed by David Cotterill played to the near post, Jay McEveley takes a shot. Save by Jason Steele.87:11
Scott Golbourne sends in a cross, Matthew Bates makes a clearance.85:49
Bart Ogbeche takes a shot. Jay McEveley gets a block in.85:03
David Cotterill fouled by Richard Smallwood, the ref awards a free kick. Scott Golbourne restarts play with the free kick.82:44 Substitution
Substitution (Middlesbrough) makes a substitution, with Bart Ogbeche coming on for Adam Hammill.82:44 Substitution
Substitution (Barnsley) makes a substitution, with David Cotterill coming on for Andy Gray.82:44
Corner taken left-footed by Matty Done, Header by Jimmy McNulty from deep inside the penalty area misses to the left of the goal.80:51
The ball is crossed by Scott Golbourne, save by Jason Steele.80:28
The ball is delivered by Jimmy McNulty, Justin Hoyte manages to make a clearance.79:56
Foul by Curtis Main on Scott Golbourne, free kick awarded. Jimmy McNulty takes the free kick.76:47
Marvin Emnes takes a shot. Matthew Bates gets a block in. Matty Done takes a corner. Corner from right by-line taken by Matty Done.75:06 Substitution
Substitution Korey Smith on for Nathan Doyle.72:01
Shot by Barry Robson from outside the box goes over the target.70:51
Faris Haroun is ruled offside. Luke Steele takes the free kick.70:00
Free kick awarded for a foul by Nathan Doyle on Marvin Emnes. Matthew Bates takes the free kick.
Adam Hammill concedes a free kick for a foul on Scott Golbourne. Luke Steele takes the free kick.67:32
Free kick awarded for a foul by Richard Smallwood on Andy Gray. Nathan Doyle takes the direct free kick.66:01
The ball is crossed by Adam Hammill.65:10 Substitution
Substitution Jay McEveley on for Chris Dagnall.65:10
Free kick awarded for a foul by Matty Done on Faris Haroun. Indirect free kick taken by Joe Bennett.63:50
Long range effort by Faris Haroun goes wide right of the target.61:28
Foul by Stephen Dawson on Marvin Emnes, free kick awarded. Free kick taken by Matthew Bates.60:48
Free kick awarded for an unfair challenge on Jason Steele by Andy Gray. Jason Steele restarts play with the free kick.60:25
Faris Haroun challenges Scott Golbourne unfairly and gives away a free kick. Free kick taken by Jimmy McNulty.59:06
Barry Robson provided the assist for the goal.59:06 Goal scored
Goal! - Seb Hines - Middlesbro 1 - 0 Barnsley Seb Hines scores a headed goal from close range. Middlesbrough 1-0 Barnsley.58:47
Barry Robson takes the inswinging corner,57:17
Marvin Emnes takes a shot. Blocked by Stephen Dawson. Outswinging corner taken by Barry Robson, clearance made by Stephen Foster. Faris Haroun sends in a cross, save made by Luke Steele.54:35
Scott Golbourne produces a cross. Matty Done takes the inswinging corner, clearance made by Matthew Bates.53:55
Matty Done takes a inswinging corner.53:35
Marvin Emnes is caught offside. Luke Steele restarts play with the free kick.49:40
Scott Golbourne takes a shot. Blocked by Seb Hines.48:42
The ball is delivered by Scott Wiseman, Chris Dagnall challenges Justin Hoyte unfairly and gives away a free kick. Jason Steele takes the indirect free kick.48:34
The ball is crossed by Scott Wiseman, Seb Hines manages to make a clearance.47:57
Direct free kick taken by Stephen Foster.47:57 Booking
Booking The referee cautions Barry Robson for unsporting behaviour.47:51
Free kick awarded for a foul by Barry Robson on Chris Dagnall.47:23
The ball is swung over by Justin Hoyte, blocked by Scott Wiseman.47:15
The ball is delivered by Curtis Main, clearance made by Jimmy McNulty.45:49
Marvin Emnes is ruled offside. Indirect free kick taken by Luke Steele.45:01
The referee gets the second half underway.45:01 Substitution
Substitution Faris Haroun on for Julio Arca.45:01 Substitution
Substitution Curtis Main on for Lukas Jutkiewicz.45:00 +1:45 Half time
Half Time The players leave the pitch at half time.45:00 +0:49
Free kick taken by Stephen Foster.45:00 +0:49 Booking
Booking Booking for Lukas Jutkiewicz for unsporting behaviour.45:00 +0:46
Lukas Jutkiewicz challenges Jimmy McNulty unfairly and gives away a free kick.45:00 +0:27
The ball is delivered by Adam Hammill, Jimmy McNulty manages to make a clearance.44:19
Barry Robson concedes a free kick for a foul on Nathan Doyle. Indirect free kick taken by Luke Steele.43:05
Nathan Doyle produces a right-footed shot from just outside the area that goes harmlessly over the target.42:27
Joe Bennett gives away a free kick for an unfair challenge on Scott Wiseman. Matty Done takes the free kick.41:15
Andy Gray is flagged offside by the assistant referee. Indirect free kick taken by Seb Hines.39:34
Marvin Emnes delivers the ball.38:49
Free kick awarded for an unfair challenge on Lukas Jutkiewicz by Jimmy McNulty. Barry Robson restarts play with the free kick.38:02
Barry Robson challenges Stephen Dawson unfairly and gives away a free kick. Luke Steele restarts play with the free kick.37:01
Free kick awarded for an unfair challenge on Lukas Jutkiewicz by Jimmy McNulty. Richard Smallwood takes the free kick.36:14
Indirect free kick taken by Stephen Foster.36:14 Booking
Booking Julio Arca receives a yellow card.36:10
Unfair challenge on Andy Gray by Julio Arca results in a free kick.33:34
Free kick awarded for an unfair challenge on Adam Hammill by Stephen Dawson. Adam Hammill restarts play with the free kick.32:50
Julio Arca takes a shot. Nathan Doyle gets a block in.32:12
Barry Robson fouled by Nathan Doyle, the ref awards a free kick. Barry Robson takes the free kick.31:01
Barry Robson has an effort at goal from just outside the box which goes wide of the right-hand post.30:21
Adam Hammill concedes a free kick for a foul on Stephen Dawson. Free kick taken by Stephen Foster.27:54
Centre by Marvin Emnes, blocked by Scott Golbourne. Barry Robson takes the inswinging corner, Lukas Jutkiewicz has a headed effort at goal from deep inside the area missing to the left of the target. Chris Dagnall challenges Matthew Bates unfairly and gives away a free kick. Jason Steele takes the free kick.27:29
The assistant referee signals for offside against Andy Gray. Free kick taken by Jason Steele.26:17
Craig Davies takes a shot. Blocked by Seb Hines. Outswinging corner taken left-footed by Matty Done played to the near post, Marvin Emnes manages to make a clearance.25:56
Julio Arca concedes a free kick for a foul on Stephen Dawson. Jimmy McNulty takes the free kick.25:09
Scott Golbourne sends in a cross, Justin Hoyte makes a clearance.22:58
The official flags Andy Gray offside. Seb Hines restarts play with the free kick.22:35
Centre by Scott Golbourne, Richard Smallwood manages to make a clearance.19:23
Craig Davies is penalised for a handball. Jason Steele takes the indirect free kick.16:00
Barry Robson has an effort at goal from just inside the box that misses to the left of the target.15:12
A cross is delivered by Craig Davies, Chris Dagnall takes a shot. Blocked by Joe Bennett.14:14
Justin Hoyte sends in a cross, Marvin Emnes has an effort at goal from deep inside the area missing to the left of the target.12:34
Marvin Emnes takes a shot. Save made by Luke Steele. Corner taken left-footed by Barry Robson from the right by-line, Scott Wiseman makes a clearance.11:49
Justin Hoyte produces a cross.10:37
The ball is swung over by Adam Hammill, Scott Wiseman gets a block in. Inswinging corner taken from the left by-line by Adam Hammill.9:21
Matty Done takes a shot. Blocked by Matthew Bates.7:28
The ball is sent over by Stephen Foster. Effort from outside the penalty box by Craig Davies goes wide left of the target.6:39
The ball is swung over by Scott Golbourne, clearance by Matthew Bates.6:24
The assistant referee flags for offside against Andy Gray. Seb Hines takes the indirect free kick.6:05
The ball is sent over by Adam Hammill, Lukas Jutkiewicz has a header from close in and clears the crossbar.3:28
Shot by Adam Hammill from outside the box goes over the target.1:06
Lukas Jutkiewicz takes a shot. Save made by Luke Steele. Andy Gray takes a shot. Save by Jason Steele. Free kick awarded for an unfair challenge on Joe Bennett by Scott Wiseman. Indirect free kick taken by Julio Arca.0:00
The match begins.
Live data and text provided by our data suppliers