Swansea got their League One title campaign back on track with a vital away win, but the result hinged on a controversial decision by referee Lee Probert in first-half added time.
He gave Swansea a penalty when Ben Clark's tackle on Jason Scotland looked perfect as the home defender won the ball.
Scotland picked himself up and scored from the spot to give Swansea the lead after they had got off to a nightmare start.
Hartlepool had taken the lead with just 28 seconds on the clock as Dorus de Vries parried James Brown's shot and Gary Liddle pounced on the loose ball to score from two yards.
But Swansea battled hard to come back and, after a spell of pressure, they were level on 23 minutes.
Darren Partley lashed a 20-yard shot into the roof of the net after the home defence failed to cope with a right-wing free-kick from Thomas Butler.
In the second half de Vries did well to save from Michael Nelson twice - the first header pushed over the bar with his finger-tips and the second gathered well as he dived to his right.
But Swansea broke out to make the game safe on 73 minutes when home keeper Arran Lee-Barrett raced off his line, lost the ball in a jumble of legs on the edge of the area and Pratley got his reward for running from deep and rolled it into an empty net.
It was a cruel blow to Hartlepool, who had done well and had been so unlucky to fall behind on half-time.
But Swansea showed their class when they were on the ball with Leon Britton and Andy Robinson looking good in midfield and Scotland always a threat up front.