The Stags have tumbled down the table of late, but late goals from Matt Rhead and Jamie McGuire eased relegation fears with a strong and determined away performance.
They took the lead on 20 minutes, James Jennings turning in from close range after Rhead miskicked his shot in the penalty area.
Pools levelled eight minutes later when Jack Barmby's shot deflected into the part of Marlon Harewood, who netted his third goal in as many home games.
He wasted the chance to make it four when his penalty on the stroke of half-time was saved by Stags goalkeeper Alan Marriott.
But the hosts eventually went ahead seven minutes after the break as Luke James was played in behind the defence to fire in his 15th goal of the season.
A triple substitution seemed to knock Pools out of their stride, though, and Jennings levelled on 72 minutes. He slipped as he took a free-kick out on the right flank and the ball curled high over keeper Scott Flinders and into the net.
Rhead put Mansfield ahead with 10 minutes to go, angling in a header from a deep Lee Beevers cross. And in stoppage time, McGuire completed a good night for the visitors, finishing low after being put clean through.