Tom Denton headed in Jak McCourt’s corner to give Chesterfield the lead at half-time.
But Joe Sbarra equalised from close-range and then Kyle Hudlin headed the winner three minutes into four of added on time.
It was James Rowe’s first defeat as manager in seven games as Blues boss after a great start to his tenure.
Here are Liam Norcliffe’s player ratings from the match...

13. Marcus Dinanga 6
Dinanga, who signed before kick-off on loan from Stevenage, came on for Denton on the hour. He won a couple of headers but with Town under pressure we did not see too much of him. Photo: Phil Tooley
4 / 4

