Julian Owusu's 90th-minute winner earned relegation-threatened Hayes a win at play-off hopefuls Southport.
Jamie Hand gave the visitors the lead from the spot, after Piero Mingoia was tripped by Simon Grand in the box.
The hosts were given a penalty of their own after Tony Gray was up-ended by Pedro Pele, and Gray stepped up himself to level matters.
With the game heading for a draw, Owusu found space in the box to smash home and give the visitors an unlikely win.
Hayes now find themselves just one point away from safety in the Blue Square Bet Premier, whilst Southport remain in 5th spot.