Burnley ended a four-game winless streak as Jay Rodriguez's stoppage-time penalty secured victory over Swansea City.
Veteran striker Rodriguez scored for the first time in 11 months as he sent Lawrence Vigouroux the wrong way from the spot.
But Swansea were left unhappy over the award of the spot-kick, which was given for a Matt Grimes handball.
There was no question that the ball hit Grimes' hand, which was raised as he went up for a header.
But Swansea will argue their captain could do nothing given that the ball was headed towards him from point-blank range by Rodriguez.
Victory means Burnley climb to fourth in the table, four points adrift of second-placed Sheffield United.
Swansea's first defeat in three games leaves them 11th, though Luke Williams will feel his team were worthy of a point.
The form guide had suggested this contest would be tight, given that both clubs have had issues in front of goal this season and both have enviable defensive records.
Yet there were near misses at either end in the first half, with Swansea's Joe Allen shooting across the face of goal before team-mate Zan Vipotnik thumped an effort into the side netting.
Burnley carried greater menace before the break, with Zian Flemming heading their best chance narrowly wide when he met Lucas Pires' corner.
Josh Brownhill and Jaiden Anthony both had efforts from distance before Luca Koleosho cut in from the left and forced a sharp save from Vigouroux, the former Claret in Swansea's goal.
Swansea threatened first after the break, with Ronald's far-post header gathered by James Trafford, before Burnley's Jeremy Sarmiento shot over as he met Connor Roberts' pull-back.
Swansea's moment almost came as they countered, when Liam Cullen's far-post header beat Trafford and was heading in until Maxime Esteve cleared off the line.
Another Swansea chance went begging when Myles Peart-Harris' tackle on Josh Brownhill saw the ball roll into the path of Florian Bianchini on the edge of the box, but the substitute's first-time effort rolled wide when a little more composure was required.
Scott Parker's Burnley came again, with Vigouroux making a fine reaction save to deny CJ Egan-Riley as he flicked on an Anthony corner.
With that the draw seemed inevitable until deep in added time, Bashir Humphreys' cross was headed up – but not out – by Harry Darling.
That left Grimes and Rodriguez competing for the second ball, with referee David Webb taking his time before awarding the penalty.
Substitute Rodriguez calmly converted, leaving Swansea feeling hard done by but delighting their hosts.
Burnley head coach Scott Parker:
"There's probably a sense of relief. I thought we were well worthy of three points today. We are moving in the right direction.
"First half I thought they posed us some problems and we probably lacked a tiny bit. I asked the lads to push a little bit more in the second half and I thought it was a different game. We showed a real intent.
"It was probably our best performance in terms of all-round today and last minute we get a penalty.
"The fine margins are we don’t get the penalty and it's a different interview we are having, but I am pleased we got the three points."
Swansea head coach Luke Williams:
"I thought the performance probably warranted a point and the manner of course that we lost was really difficult to accept.
"I am a long way from the action and I don’t have a very good view. There were a lot of people in the box competing for the ball.
"There's nothing I can do about it even if it's not a penalty.
"I am not sure the opposition appealed for it too much. I don’t know. It's very disappointing.
"We had one off the line and then there was a great save [from Vigouroux]. It's very, very difficult to accept."