Jay Rodriguez scored his 18th goal of the season as Burnley beat Barnsley to reignite their promotion push.
The Clarets had taken one point from their past two games, but Rodriguez's simple finish steadied their nerves.
A Charlie Austin header was ruled not to have crossed the line and Barnsley almost levelled when Craig Davies hit a 25-yard strike against the bar.
But Burnley sealed victory when Dean Marney released Rodriguez and, although he struck the post, Austin tapped in.
The result edges Eddie Howe's side to within four points of the top six, while back-to-back defeats mean Barnsley sit 16th.
Burnley got off to a fine start, Ross Wallace crossing from the right for Josh McQuoid's knockdown at the far post to offer Rodriguez a routine strike, his fourth goal in as many matches.
The hosts pushed for a second and Kieran Trippier stung the palms of visiting goalkeeper Luke Steele before Austin headed over.
David Perkins appeared to clear another Austin header from behind the line, but the goal was not given.
Howe's men did not allow the controversy to knock them out of their stride, two superb crosses from Trippier being headed narrowly off target by McCann and Rodriguez.
Davies threatened an equaliser in the 56th minute when he rattled the woodwork, and Barnsley's misfortune was compounded when Austin sealed victory.
VIEWS FROM THE DRESSING ROOM
Burnley manager Eddie Howe:
"We wanted a reaction and we got one. The lads were excellent tonight. I thought we played very well against a good side. We looked dangerous all night and our front two worked very hard.
"From a physical point of view we have had a lot of games in the last few weeks and Barnsley didn't play on Saturday but it didn't show.
"Barnsley are a good team. It was good to keep up the momentum for 90 minutes. We rode our luck a little bit when they hit the bar but I thought we deserved that.
"Charlie Austin will have been pleased he scored tonight. In the games against Derby and Peterborough he had chances and it was pleasing that he was able to take them."
Barnsley manager Keith Hill:
"I am as disappointed as the fans who came to watch that tonight. As a manager, depending on what the pressure is like, it could be a sackable performance.
"If we had been in the bottom three then I may have been getting a phone call tonight. The previous ten managers of Barnsley have had that call.
"The players are responsible for the poor performance. It is my responsibility to set them up but if they do not respond to what I tell them to do and do what we ask in terms of what they have done already this season, that is where the line is drawn, with the players.
"In terms of affecting that game, there is not a lot I can do other than make changes and then I have to suck it in.
"It was shocking. This was no bad day at the office, we didn't deserve any luck. It would have been scant reward if we had have equalised and changed the course of the game."