Nottingham Forest were pegged back twice by Barnsley in an entertaining Championship encounter, but Darius Henderson scored an 85th-minute winner to ensure that the home fans left the City Ground in good spirits.
Simon Cox, who was re-instated to the Forest team this afternoon, rattled the post with a rasping shot in the 10th minute before Jamie Mackie was denied by a good Mike Pollitt save, as the hosts dominated early proceedings.
The duo combined just three minutes later to give the home side the lead. Pollitt once more denied Mackie with a good save, but the 41-year-old could only parry the ball to Cox, who tapped in from close range.
For all their dominance, Forest could only hold onto the lead for 90 seconds. Chris O'Grady stepped up to score his fourth goal in as many games from the penalty spot after David Perkins was brought down.
Andy Reid almost put his side ahead in the 25th minute, but his fierce free kick cannoned off the crossbar and Pollitt gratefully snatched the ball off the feet of the goalscorer Cox.
In first half stoppage time, Kelvin Etuhu inadvertently scooped the ball into the roof of his own net from a wicked free kick.
Jean-Yves Mvoto was replaced by Martin Cranie at the break as David Flitcroft looked to get his side back on level terms.
O'Grady was almost gifted his second goal of the game when the home defence dallied on the ball, but they scrambled it clear with the former Sheffield Wednesday man lurking.
Tomasz Cywka and Chris Dagnall entered the fray as the away side looked to force an equaliser and the changes paid dividends immediately.
Cywka unleashed an unstoppable free kick into the top corner from 30 yards out to drag his team level for the second time in the game.
Jamie Paterson replaced Radoslaw Majewski and the youngster almost gave his side the lead once again, but his 25-yard effort crashed against the foot of the post.
With just five minutes remaining, Forest took the lead for the third time when Henderson nodded home a cross to send the home fans into raptures.