Wrexham moved level on points with leaders Grimsby at the top of the Blue Square Bet Premier with a gritty win to end Hereford's six-game unbeaten run.
A deflected Jay Harris free-kick on 32 minutes separated the sides in a match of few openings at Edgar Street.
Hereford's greatest threat came from aerial set-pieces, striker Chris Sharp missing their best chance with a free header from six yards.
Glen Little's late effort was blocked by Hereford defender Luke Graham.
Grimsby lead Wrexham by one goal but now have a game in hand over their nearest rivals, having had Tuesday night's game at Nuneaton postponed.
Hereford slip to 13th in the table, now 11 points adrift of the last play-off place, after the Bulls' first defeat since Boxing Day.
VIEW FROM THE DRESSING ROOM
Bulls manager Martin Foyle told BBC Hereford & Worcester:
"It was a horrendous pitch. The sort you have to take four touches on, instead of two.
"But the goal we've given away was a silly free-kick by Marley Watkins on the edge of the box and it gives them a lifeline.
"You can't tell me they're better than us. I'm not having it. But they've got experience and they know how to win a game."
Wrexham-player manager Andy Morrell told BBC Radio Wales:
"It was a really big win. It's important we keep this run going. We've got three points at a really difficult place to come.
"Hereford are going well and that was hard. The pitch was not pretty - I don't think I've seen so many players kick the ball out of play.
"But the lads are delighted. They've worked so hard and deserve it."