LATE strikes from Danny Graham and two-goal Lee Tomlin ensured relegation for Barnsley, whose eight-season Championship tenure ended on Teesside.
The game was finely poised at 1-1 going into the final few minutes, with the Reds needing a winner to extend their survival flight another week, only for fate to intervene at the other end.
Goals on the break from Graham, who fired in the rebound after the excellent Luke Steele denied Albert Adomah and the impressive Tomlin after an assist from Adomah cooked Barnsley’s goose with the Oakwell men now only playing for pride at home to QPR next weekend - with League One football on the menu for the first time for the first time since the 2005-06 campaign.
Danny Wilson made three changes for the Reds’ do-or-die encounter on Teesside, with Marcus Pedersen making a return after injury along with Kelvin Etuhu and Ryan McLaughlin.
Lewin Nyatanga and Patrick McCourt dropped out of the squad altogether with Tomasz Cywka starting from the bench.
Boro, without the injured duo of George Friend and Grant Leadbitter, recalled veteran defender Jonathan Woodgate, along with Tomlin, ex-Oakwell midfielder Jacob Butterfield and Adam Reach, handed a start on the left wing following his return from a loan spell at Bradford City.
In front of a meagre crowd, with Barnsley backed by a small contingent on the right-hand side of the East Stand, the hosts - who produced low-octane end-of-season showings in their Easter losses to Reading and Millwall - again struggled for tempo and quality early on.
A half-chance saw Reach deceive makeshift right-back Etuhu and fire an effort wide, but it was Barnsley who started the tidier, having plenty of possession and fashioning out a decent chance on 12 minutes.
Dale Jennings’ pass found Pedersen, whose shot took a significant deflection off a home defender, but fortunately for Boro’s sake, it wasn’t strong enough to beat Dimi Konstantopoulos.
Fielding a 4-1-4-1 formation, Boro flattered to deceive early on with Biutterfield firing tamely over before their only tangible moment in the first half hour saw Danny Graham fire a well-struck shot over after a slick pass from Tomlin.
A purposeful spell did arrive shortly after from the hosts, with Tomlin saw his low shot held by Steele, who moments later blocked a similar effort from the ex-Peterborough man with Reach firing the rebound just wide, to the relief of the Reds.
Boro started to significantly step things up, with Steele holding onto top-scorer Adomah’s low strike as the hosts, belatedly, started to turn the screw as force the Reds onto the back foot.
The chances started to turn into a flood as Boro took a stranglehold on proceedings, with Barnsley forced to hang on before the respite of the half-time whistle following a thoroughly dominant spell from the Teessiders, whose saw a couple of half-shouts for penalties for possible handball offences rebuffed by Darren Drysdale.
Fortunately for Barnsley’s sake, Steele showed his mettle amid something that started to resemble an onslaught, denying Butterfield, Reach and the increasingly prominent Tomlin, starting to make a real nuisance of himself just behind Graham.
Steele also denied sub Daniel Ayala, on for the injured Woodgate, shortly before the interval with Barnsley somewhat fortunate to come in at the break on level terms following a frenzied home spell.
Half-time results painted a bleak picture for the Reds, whose supporters would have been mindful that they would be relegated if the scores stayed the break and in need of some inspiration - and possibly help from elsewhere.
On the restart, Tomlin showed some early intent by flashing a shot wide with Boro continuing to assume the box seat position, only for Barnsley to deliver a stunner on 53 minutes.
After earning a corner after Chris O’Grady’s shot was diverted behind, Boro’s defence temporarily switched off following Tom Kennedy’s free-kick, with big defender Jean-Yves M’Voto nipping in to steer the ball low past Konstantopoulos in composed fashion.
A chorus of ‘We are staying up’ soon arrived from the ectastic away brigade, but their celebrations had barely died down before Boro pulled instantly level.
The ball found its way to Tomlin, whose crisp low shot beat Steele, who had hitherto performed heroics to keep the Teessiders out.
Steele was soon busy again to turn away a piledriver of a free-kick from Graham before Tomlin dragged an effort wide.
Wilson then made a double change throwing Nick Proschwitz and Jim O’Brien into the fray, with the former, who netted for parent club Hull in an FA Cup win at the Riverside in January, spurning a decent chance to make himself a hero on 69 minutes.
The big German, after firing an early sighter at Konstantopoulos, was afforded space into the box, but struck his effort off target when well placed.
An opportunity just as presentable, perhaps moreso, arrived four minutes later, with M’Voto, completely unmarked, powering a header over following Kennedy’s outswinging corner, much to the angst of the Reds contingent.
Boro was handed another scare when only a timely last-ditch intervention from Jozsef Varga denied the Reds after good work by Proschwitz and O’Brien before Wilson played his last card with young striker Danny Rose coming on for McLaughlin.
The game was in the balance going into the final stages before the decisive development when the hosts’ way.
O’Brien surrendered possession after Nathaniel Chalobah surged upfield to set up Adomah, whose shot was superbly saved by Steele before Graham dispatched the rebound.
To rub salt into the wounds, Boro added a third in the third minute of stoppage time when Tomlin fired home his second of the game.
Middlesbrough: Konstantopoulos; Varga, Woodgate (Ayala 41), Omeruo (Hines 67), Gibson; Whitehead; Adomah, Butterfield (Chalobah 60), Tomlin, Reach; Graham. Substitutes not used: J Steele, Main, Ledesma, Morris.
Barnsley: L Steele; Etuhu, M’voto, Cranie, Kennedy; McLaughlin (Rose 81), Dawson, Lawrence (O’Brien 60), Jennings, Pedersen (Proschwitz 60), O’Grady. Substitutes not used: Turner, Ramage, Cywka, Mellis.
Referee: Darren Drysdale (Lincolnshire).
Attendance: 14,867 (751 Barnsley fans).