Huddersfield were rocked by an inspired Chesterfield first-half performance but the visitors could still have ended up salvaging a point from a highly entertaining match.
In the end, the Terriers were left to reflect on a 51st minute penalty miss by the normally lethal Pawel Abbott as a turning point after they came close to pulling the game out of the fire in the final minutes.
Chesterfield deservedly led at half time although Huddersfield were guilty on two of the goals and left themselves with a huge task in the second half.
Chesterfield almost threw it away when they switched off in the last three minutes and Huddersfield came close to an equaliser in stoppage time.
That would have flattered them because they were easily second best before the interval when Chesterfield were quicker and sharper in the areas that mattered.
Wayne Allison reminded one of his former clubs of his predatory qualities with a crisp finish in the 11th minute after a neat move on the left had set him up neatly.
Paul Hall left Abbott holding up his hands after the striker carelessly lost possession just inside the Chesterfield half and the home side broke for Hall to beat two players and curl a shot into the top left-hand corner from just outside the box.
There was worse to come for Huddersfield when David Mirfin allowed Colin Larkin to take the ball off him on the edge of the area and drive in number three.
When Allison conceded a 51st minute spot kick Abbott put his effort far too close to Barry Roche and that appeared to be the end of any chance Huddersfield had of getting back into the match.
Roche made a number of outstanding saves and was only beaten when former Chesterfield midfielder Mark Hudson lobbed the ball over him and then coolly followed up to roll the ball into the empty net.
But Mirfin then pushed Larkin and Shane Nicholson showed how to take a penalty with an unstoppable shot into the top right-hand corner.
But Huddersfield kept going and when Andy Booth headed the ball back across goal, Gary Taylor-Fletcher forced Roche into another save but this time Jon Worthington put away the rebound.
Andy Holdsworth got another in the 90th minute and Chesterfield were left rocking during four minutes of injury time and only just held on.