Chesterfield fought back from two goals down tonight - but still lost their fragile grip on the League Two top spot.
The Spireites hosted 18th place York City at the Proact Stadium, aiming to emerge from a sequence of three defeats in their last four games.
Paul Cook’s side started off the evening sharing top spot with Rochdale and Exeter.
However Rochdale beat Northampton 3-2 and leapfrogged into pole position.
The home side featured five changes after defeat to Burton Albion.
There was no Chris Porter in the squad and they were also without former Sheffield Wednesday full-back Drew Talbot (groin,)
York City boss Nigel Worthington had ordered more effort from his troops after they were beaten 3-0 at Newport on Saturday.
But his team were forced to give away a few fouls in their attempts to stave off early pressure.
On 11 minutes a smart passing move down Chesterfield’s right wing saw the ball fall to attacking midfielder Gary McSheffrey but he fired just over.
City threatened to turn up the heat though with Josh Carson firing one in from the right side of the box, which was saved by Tommy Lee.
A goal looked increasingly likely with Armand Gnanduillet sending a header wide of the target, after first bouncing it off the deck.
Sam Morsy saw an effort go in a similar direction.
While Ryan Brobbel tested Lee too.
But Chesterfield were first to concede when Luke O’Neill flashed a shot home from outside the box to the bottom left corner.
Gnanduillet had a chance to level soon after but, again, the ball went over.
The halt time pep talk seemed to invigorate the Spireites.
Jamie Devitt crossed for Roberts whose clean effort was cleared off the line.
And Michael Ingham pulled off a remarkable save from Roberts.
Yet the pressure blew up in the home team’s face.
A poorly marked corner saw York Ryan Jarvis glance the ball past Lee.
However, Jamie Devitt drew a foul in the penalty area and Gnanduillet narrowed the margin to a single goal.
The crowd were in their element when Chesterfield brought the game back to 2-2, Jay O’Shea slotting home from close range.
Two goals in 12 minutes!
The scene was set for a dramatic late winner - but York were determined not conceded any more.
Chesterfield (4-2-3-1): Lee; Edwards, Evatt (c), Cooper, Humphreys; Morsy, Ryan; Devitt, Roberts, McSheffrey; Gnanduillet
Subs: Chapman, Hird, Darikwa, Banks, O’Shea, Doyle, Richards
York City: Ingham, Oyebanjo, Davies, McGurk, Parslow (c), Jarvis, Carson, Montrose, Brobbel, Whitehouse, O’Neill
Subs: Kettings, Smith, Fletcher, Cresswell, Platt, Bowman, Puri
Referee: Mark Brown (East Yorkshire.)