Barnsley clinched their first win in six. They led 3-0 but almost let it slip with two Adomah goals for Boro in the last 10 minutes.
Jutkiewicz muscled his way past left-back Kennedy and bent a left-foot shot just wide of the left post.
Pedersen, making his first start since recovering from an ankle injury, was felled on the edge of the box in the 21st minute, but referee Langford played advantage and the Reds nearly scored.
The ball ended up at the feet of McCourt, but he rifled wide with a right-foot shot.
Then Jutkiewicz missed a glorious chance to give Boro the lead when he was fed through by Hines.
Hines’ delightful chip saw the Reds’ defence left flat-footed, but Jutiewicz blazed over the bar with only Butland to beat. It was a poor miss and the Pole’s miss proved costly as then the Reds scored against the run of play.
McCOURT weaved his way into the Boro penalty area in the 26th minute, wriggled away from two defenders before slotting into the bottom right-hand corner.
But two minutes later scorer McCourt was forced to leave the field injured and O’Brien replaced him.
Boro won a free-kick on the edge of the Reds’ box and nearly scored. Leadbitter’s free-kick found Kamara who headed into the path of Jutkiewicz. But this time the striker headed lamely at Butland. Another Boro miss proved costly again as the Reds broke on the counter-attack and substitute O’Brien’s long-range shot deflected off O’Grady who doubled the Reds’ lead in the 41st minute.
Then two minutes before the break Pedersen was felled by Gibson in the box and won his side a penalty.
O’GRADY stepped up and cooly slotted home from the spot into the right corner for his seventh goal of the season.
Fox curled a corner into the box and Frenchman M’voto head well over in the 54th minute as the Reds went in search of their fourth goal of the afternoon.
Mellis was then substituted with 25 minutes remaining clutching his left side and Polish winger Cywka was introduced to the action.
Mowbray made his final not long after with Carayol, a player previously on the Reds’ radar, replaced him with Boro desperate to snatch a goal.
O’Brien tried his luck from distance, but his right-foot shot was well wide.
A tired-looking Pedersen, who had earlier won his side their penalty, was taken off with 16 minutes to go and Scotland was given the chance in the final phase of a match which, for once, was going the Reds’ way.
And barring a capitulation the Reds were well on course for their first win since the end of August. Barnsley were bidding for their first win for six games in the league and their first since that 2-1 home triumph over Huddersfield nearly two months ago.
And how Flitcroft’s side needed three points as they hauled themselves off the bottom of the table.
The Reds had a wake-up call with 12 minutes left when O’Brien failed to clear the ball and it allowed substitute Carayol to unleash a shot on target, one which clipped the top of the crossbar.
At the other end O’Brien, looking to get on the scoresheet, poked fractionally wide as the Reds went close to a fourth goal.
Butland produced an excellent fingertip save to push sub Emnes’ goalbound shot wide of his left post.
It was another scare for the Reds, but Boro did eventually score after some good pressure. Carayol’s left-wing cross was headed into the path of ADOMAH by Smallwood and the striker beat Butland with a good strike in the 82nd minute.
And then moments later ADOMAH netted his fourth goal of the season with a free header from a Richardson cross to give Boro hope of at least a point.
Adomah had a great chance for a hat-trick and the equaliser with three minutes remaining, but his curling right-foot shot flew just wide.
Friend had a goalbound header deflected wide in the last minute as they soaked up the pressure and Kamara head wide in stoppage time, but the Reds somehow held on. What a rollercoaster for their frustrated fans.