Harrogate Town kept up the pressure on league leaders Barrow, with an injury time winner at the Proact Stadium, Chesterfield.
Simon Weaver made seven changes to the Town starting line up, reverting to the side which defeated Eastleigh in the last league fixture.
Town were first on the scoresheet, when after only nine minutes, Jon Stead headed in Warren Burrell’s searching cross.
The Spireites hit back with Tom Denton forcing James Belshaw to tip over the bar, but on 26 minutes Denton levelled the score, turning in Jordan Cropper’s centre at the back post.
Soon afterwards, Chesterfield made it two when Liam Mandeville converted Nathan Tyson’s strike from close range.
Not to be outdone, Town equalised before the break, after Stead and Jack Muldoon combined to release Jack Diamond who crossed for George Thomson to shoot home.
Harrogate regained the lead on the hour,with Stead scoring his second when he beat Jalal with a looping header from Diamond’s centre.
At looked as though Town would have to share the points, after sub Boden, stabbed in with only eight minutes left, but the visitors still had a shot left in their locker.
Deep into stoppage time,Muldoon knocked in Diamond’s cross from five yards out, to give Town a well-earned victory.
Unused subs,G Smith,Cracknell,Kiernan,Bradley,Harratt.
Scorers,Stead 9,60,Thomson 34,Muldoon 90+2
Booked W Smith,Fallowfield.
Jalal,Buchanan,Yarney(Hutchinson 66),Evans,Weston,Mandeville(Fondop 66),Tyson(Boden 78),Smith,Hollis,Denton,Cropper.
Scorers,Denton 26,Mandeville 29,Boden 82.
Referee,S Barrott. Att.2912(138 away)