The Marketmen had won their last two league games, both away from home at Redditch United and AFC Rushden & Diamonds on Tuesday night. Prior to kick off they sat in 16th place, seven points behind the Pitmen having played one more game. Needham were the 1-0 winners at Keys Park earlier in the season.
The Marketmen took the lead in the first minute when Adam Mills carried the ball forward on the left producing a low drive which Shaun Rowley, in goal for the visitors parried, as far as Callum Page who bundled the ball home from close range.
The Pitmen were back on terms nine minutes later when a corner taken on the right found skipper Ben Bailey inside the six yard box who finished from a corner for the second week running.
After the initial setback the Pitmen were on the front foot with a succession of corners and a decent shout for a penalty following a push inside the area on midfielder Reece King.
After controlling the game for a good twenty minutes, Needham Market took the lead again against the run of play when Page found some space on the left, squaring the ball to Mills who fired the ball into the roof of the net from eight yards out.
Worse was to follow for the Pitmen a few minutes later when a back pass from Matt Curley was seized upon by Mills, his pass finding Billy Hunt who despite Rowley coming out to narrow the goal, found the bottom left of the net. Following a discussion between the referee and his officials the goal stood.
The half ended with yellow cards for Danny Glover, Solyir Salani and Billy Hunt.
The second half unsurprisingly was a more low key affair at least to begin with, with few chances carved out by either sides. Ben O'Hanlon produced a couple of dangerous crosses for the Pitmen, the first headed over by Glover while the second was gathered in by Shorten in goal for the Marketmen.
The home side again found space on the left, with Hunt squaring a ball for Noah Collard who dragged his shot inches wide of the upright. A game that had rapidly descended into a scrappy encounter suddenly sprung to life in the 74th minute when King headed home from a corner to bring the visitors back into the game.
Minutes later the visitors were level when substitute Elliot Hodge struck a great shot into the bottom corner of the net from the right edge of the box. With the scores unexpectedly level the game opened up as both sides went for the three points. Needham substitute got on the end of Hunt's cross for the home side to retake the lead. Glover had a shot hacked away off the line after a cross had beaten Shorten in the 86th minute
Despite five minutes added on time the Marketmen hung on in a breathless finale that saw them take the rewards in a seven goal thriller.
Needham Market; Shorten, Dye, Sturgess, N Collard, K Morphew (C), D. Morphew, Marsden (Baker 82), Page (Santa 92), Hunt, Parker, Mills. Subs not used; Diogo, Godward, Munson.
Hednesford Town; Rowley, Curley, Griffiths, Bailey (c), Gatter, Solanke (Hallahan 68), O'Hanlon, King, Glover, Salani (Hodge 57), Abadaki. Subs not used; Reid, Fry, Veiga