Match ends, Chesterfield 2, Wigan Athletic 3.
Substitute Jordy Hiwula grabbed a 90th-minute winner as Wigan Athletic scored three goals in the final nine minutes to fight back from 2-0 down and beat Chesterfield in a compelling match.
Dan Gardner's fabulous 30-yard strike put the Spireites ahead and Leon Barnett's own goal put them in control.
But Barnett's fine low shot and a Craig Davies penalty levelled things.
And, as the Wigan pressure grew, Hiwula stole the points when he scored with a coolly-taken right-foot strike.
The victory, which puts Wigan level with their hosts on 10 points, looked a near impossibility as the hosts seized control after a goalless first half.
The Latics were on top before the interval but trailed when Gardner cut in from the left flank and crashed a superb shot high into the net.
Barnett's bizarre headed own goal looked like deciding the match, but he made amends when he netted at the right end on 81 minutes.
And, after Davies scored from the spot following Sam Hird's foul on Chris McCann, Hiwula's strike ensured a first away league win of the season for Wigan.
Wigan manager Gary Caldwell told BBC Radio Manchester:
"Crazy game. I thought we deserved to be in front before they scored but in the second half we just had a crazy 10 minutes.
"Character and desire is something you need in any successful football team. The way they played in the last 15 to 20 minutes was phenomenal and we deserved to win at the end.
"I'd look like Graham Barrow, with grey hair, if we keep doing that so that's not how we want to win games.
"But at times you need to have the desire to keep going. We're going to need that throughout the season."
- 12O'NeilSubstituted forRaglanat 43'minutes
- 24BanksBooked at 36mins
- 28AriyibiSubstituted forHumphreysat 82'minutes
- 11NovakSubstituted forGnanduilletat 58'minutes
- 5DanielsSubstituted forMcCannat 59'minutes
- 24MurraySubstituted forKellettat 79'minutes
- 29VuckicSubstituted forHiwula-Mayifuilaat 60'minutes
- Mark Brown
- Shots on Target
Second Half ends, Chesterfield 2, Wigan Athletic 3.
Delay over. They are ready to continue.
Delay in match Richard O'Donnell (Wigan Athletic) because of an injury.
Attempt saved. Jay O'Shea (Chesterfield) right footed shot from outside the box is saved in the top centre of the goal.
Corner, Chesterfield. Conceded by Jason Pearce.
Goal! Chesterfield 2, Wigan Athletic 3. Jordy Hiwula-Mayifuila (Wigan Athletic) right footed shot from the centre of the box to the centre of the goal.
Attempt blocked. Armand Gnanduillet (Chesterfield) right footed shot from outside the box is blocked.
Goal! Chesterfield 2, Wigan Athletic 2. Craig Davies (Wigan Athletic) converts the penalty with a right footed shot to the bottom left corner.
Penalty conceded by Sam Hird (Chesterfield) after a foul in the penalty area.
Penalty Wigan Athletic. Chris McCann draws a foul in the penalty area.
Jordy Hiwula-Mayifuila (Wigan Athletic) hits the bar with a right footed shot from the centre of the box.
Attempt saved. Michael Jacobs (Wigan Athletic) right footed shot from outside the box is saved in the centre of the goal.
Foul by Ritchie Humphreys (Chesterfield).
Andy Kellett (Wigan Athletic) wins a free kick on the right wing.
Sam Hird (Chesterfield) wins a free kick in the attacking half.
Foul by Craig Davies (Wigan Athletic).
Substitution, Chesterfield. Ritchie Humphreys replaces Gboly Ariyibi.
Goal! Chesterfield 2, Wigan Athletic 1. Leon Barnett (Wigan Athletic) right footed shot from outside the box to the bottom left corner.
Corner, Wigan Athletic. Conceded by Sam Hird.