Graham Turner's Hereford reinforced their promotion ambitions as they claimed the impressive scalp of high-fliers Rotherham.
A first-half goal from loan signing Gary Hooper was enough to hand the visitors victory after a hat-trick of defeats.
It left Rotherham suffering two defeats in a row for the first time this season as they look for a quick return to League One.
After a first half of grim football, Hereford broke the stalemate when they grabbed the vital winner five minutes from the break.
Hereford, who arrived two spots behind third-placed Rotherham, defended stubbornly as the home side's three inexperienced frontmen found it hard to cope. But on the break Hereford earned the right to drop back even deeper by grabbing the vital goal they could protect.
Lee Collins burst down the right and his cross was rifled accurately to the front post.
Hooper reacted first and pounced on the ball to drill in a close range shot that keeper Andy Warrington managed to reach it but couldn't prevent from crossing the line.
Rotherham had been left frustrated as the visitors - boasting an impressive eight wins on the road - were happy to force the home side to shoot from distance.Chris O'Grady hit a tame shot at the keeper and Mark Hudson fired over from the edge of the area before Pablo Mills hooked a 20-yard effort wide.
Hereford had flashed a warning before the goal when Rotherham were forcing the pace but Simon Johnson was wayward with his final shot.
Rotherham manager Mark Robins brought on 11-goal leading scorer Derek Holmes for the second half and he caused the visitors immediate problems.
But only a tremendous save from Wayne Brown preserved the lead when he turned away a goalbound shot from Mills 20 yards out.
After 62 minutes Theo Robinson blew a glorious chance for a second goal when he found space and blazed wide with only the keeper to beat.
As the pressure mounted from Rotherham, Brown again produced a super save to beat away a shot from Mills.
The the visitors broke again and Robinson came close to a second, but keeper Warrington dived full-length to deny him.
Not good enough,we are losing to the top teams and are falling away from the top. looks like we may have to settle for the play-off's. Why didnt we get a striker in