Graeme Lee’s first home match in charge of Hartlepool saw a five-match losing streak in League Two come to an end with a dramatic 2-1 victory over Rochdale.
Mark Shelton’s tap-in deep into stoppage time ended the Dale’s eight-match unbeaten run in the league.
Josh Andrews, on loan from Birmingham, finished off a fine move in the 55th minute to put Rochdale on track for three points.
But Hartlepool hit back 10 minutes later when striker Mark Cullen got on the end of Shelton’s pass over the top of the defence, before the latter struck at the death.
Before those two goals chances were few and far between at Victoria Park.
Luke Molyneux was close to opening the scoring midway through the opening period when he rounded goalkeeper Jay Lynch but was denied by Jeriel Dorsett.
Hartlepool goalkeeper Ben Killip made a fine double stop to prevent Liam Kelly and Jake Beesley.
Andrews put Robbie Stockdale’s side in command after the break.
But Hartlepool followed up Cullen’s equaliser and sixth of the campaign from a tight angle with the winner during a frantic finish.
Shelton was unmarked at the back post to convert after substitute Joe Grey’s excellent work after Andrews’ header shaved the crossbar at the other end.