Darius Henderson netted a late winner as Nottingham Forest overcame Barnsley.
The home side took the lead when Simon Cox slotted in after a Jamie Mackie shot had been parried, only for Chris O'Grady to equalise through a penalty.
Kelvin Etuhu's own goal put Forest back in front but a stunning 30-yard Tomasz Cywka free-kick levelled matters again.
Forest's Jamie Paterson was denied by the post before fellow substitute Henderson thumped in a header from Andy Reid's cross to win it.
Forest manager Billy Davies was forced to watch the match from the stands as he served a one-match touchline ban from a 2-1 defeat by Wigan in his side's last game.
He saw Cox go close to opening the scoring only for the striker's shot to bounce away off the inside of the woodwork before 41-year-old Barnsley keeper Mike Pollitt - making his 500th career league start - did superbly to deny Mackie.
However, when Pollitt parried another Mackie effort, Cox pounced to put Forest ahead.
The lead lasted less than two minutes as Guy Moussi was punished for a challenge on David Perkins and O'Grady converted from the spot.
A Reid free-kick was deflected on to the Barnsley bar before the midfielder had a hand in Forest's second as his cross led to Etuhu steering the ball into his own net.
A powerfully struck free-kick from Cywka restored parity but Barnsley were hanging on as an effort from Paterson hit the post.
The visitors finally succumbed when Henderson struck after 84 minutes to leave the Tykes as the only club without an away point in the Championship so far this season.
Nottingham Forest deputy manager David Kelly:
"The substitutions were very productive, they worked really well - the gaffer is really big on making impact substitutions.
"[The substitutes] did very well when they came on, helping us to win a game we deserved to win.
"I have spoken to the gaffer and he is pleased, obviously very pleased. We were patient and we have a never-say-die attitude. The players have a desire and a will to win."
Barnsley boss David Flitcroft:
"It was an open encounter and I was happy with how my team tried to create chances, but I am disappointed that we did not take a point.
"We did not deserve to win the game, they had a lot of good chances and Mike Pollitt was in excellent form.
"But the penalty was deserved and if you see a better goal than the one from Cywka today I would be surprised.
"I wanted the lads to dig in for one more moment - but they didn't. We have not got anything, but I am happy that we only have a few days until we play again (at Bournemouth)."