Robbie Weir’s dramatic stoppage-time winner saw Chesterfield come from behind to beat Barnet 2-1 - a result which sees them climb off the foot of the table.
Both sides occupied the relegation places prior to kick-off and after a tentative opening, John Akinde was on-hand to put Barnet ahead.
The Spireites levelled in the second-half after defender Charlie Clough turned Chris O’Grady’s cross into his own net and then Weir netted at the death.
Akinde (11) latched onto Ryan Watson’s long pass and then calmly slotted the ball under debutant goalkeeper Cameron Dawson.
The visitors, who have previously won one of their last 15 games, showed lapses in their defence and gifted Chesterfield several chances to equalise before half-time.
Jak McCourt, who scored four goals in his previous five games, had a long-range effort well saved by Jamie Stephens.
Kristian Dennis had two opportunities shortly after but failed to control the ball on both occasions.
Chesterfield's best chance fell to Joe Rowley, but he put his effort over from a good position. Minutes later, Dennis and Jerome Binnom-Williams both had shots blocked in the penalty area.
Chesterfield were forced into their first change on the half-hour mark after Andy Kellett went down injured. Matthew Briggs was his replacement and almost made an immediate impact after firing Dennis’ cross goalwards, but a Harry Taylor block prevented a certain goal.
The second half took a while for either side to create a goalscoring chance.
In the 62nd minute, a McCourt volley from the edge of the area was blocked and Barnet managed to scramble the loose ball clear.
The equaliser came in the 66th minute when O’Grady, who had replaced Briggs, saw his cross into the area diverted into his own net by Clough.
Barnet substitutes Simeon Akinola and Shaquile Coulthirst both had opportunities to put Barnet back in frony. Akinola’s shot was blocked by Sam Hird and from the resulting corner, Dawson failed to punch clear and Coulthirst blazed over the bar.
Six minutes were added on and it looked like Stephens’ save from Dennis's close-range effort was the game’s final chance.
But Ian Evatt’s pass put Weir in on goal and the midfielder kept his cool and produced a fine finish to seal a dramatic victory.
The Spireites are now unbeaten in their last six league games, a run which has seen them climb up to 21st in the table.
Chesterfield: Dawson, Barry (Wiseman), Hird, Evatt, Binnom-Williams, Weir, McCourt, Rowley, Reed, Kellett (Briggs) (O'Grady), Dennis
Substitutes: Parkin, Wiseman, Mitchell, O’Grady, DImaio, De Girolamo, Briggs
Barnet: Stephens, H. Taylor, Santos, Clough, Blackman, Watson, J. Taylor, Sweeney, Campbell-Ryce, Akinde, Vilhete
Substitutes: Ross, Nelson, Coulthirst, Tutonda, Akinola, Fonguck, Nicholls
Attendance: 5,272 (126)