Pools had not been on the scoresheet since February 26 before Andy Monkhouse ended a 762-minute drought with a 42nd-minute header.
Winger Monkhouse then snaffled a second goal in the 72nd minute to lift Pools off the foot of npower League One by leapfrogging the Shakers.
Pools could have been relegated if they had lost and had other results gone against them, but instead sit five points adrift of safety with three games left.
"It's very pleasing, not a great match," admitted Hughes. "It was two competitive teams, but it was a must-win game for us and we got off the foot of the table.
"What will happen, will happen and we owe it to our supporters to put pride in the club.
"We tried to play football, conditions weren't great, but we played it properly and I'm delighted to pick up the points - it gives us a little bit of hope.
"We all want to end the season on a high and I want to set a winning culture at this club. The boys are still playing for their livelihoods and we all want to play a part in it."
- Sports & Recreation