Stockport County grabbed a priceless win at Alfreton to move out of the Blue Square Bet Premier's bottom four.
They fell behind when Danny Meadows converted Nathan Arnold's cross.
But Ian Bogie's men levelled through James Tunnicliffe's close range shot, before Jon Macken set up Mark Cullen to put County in front after the break.
Jon Nolan drilled in from the edge of the box to make it 3-1, and although Arnold reduced the deficit from 18 yards, Stockport held on.
Stockport are now one point above the drop zone while Alfreton are three points clear, with a game in hand.