Chesterfield hit three second-half goals to beat York and climb within a point of the League Two play-offs.
Drew Talbot tapped in the Spireites' opener just seconds after the break.
Chesterfield substitute Danny Whitaker's first touch on 75 minutes then doubled the home side's lead.
And, just two minutes later, he turned provider, beating keeper Michael Ingham to an underhit back pass to feed Luis Boa Morte, who was crowded out, only for Tendayi Darikwa to smash home.
VIEWS FROM THE DRESSING ROOM
Chesterfield assistant manager Tommy Wright told BBC Radio Sheffield:
"The first half York were the better side, but we changed one or two things at half time.
"We got a great response (from the players), especially after last week.
"The most important thing is how you respond and I thought we bounced back well.
"Luis Boa Morte has been great since he's been at the club and he was terrific today."
York City manager Gary Mills told BBC Radio York:
"It's a 90 minute game and we have got to go and play the second how we played the first.
"We were on our front foot first half and made it difficult for them.
"I thought we responded well for five minutes after they scored, probably our best spell of the second half and then when you concede the second and then a very, very sloppy third it's disappointing.
"We have to be able to play to that level like we did first half to get a result out of this league. Forty five is not enough."
Chesterfield 01 Lee 03 Smith 06 Hird 25 Talbot 31 Cooper 08 Togwell 12 Darwikwa 23 Randall (Clay - 61' ) 33 Townsend (Whitaker - 74' ) 34 O'Shea 37 Boa Morte (Dickenson - 84' ) Substitutes 13 O'Donnell 05 Trotman 10 Whitaker 15 Clay 18 Boden 22 Wafula 38 Dickenson York City 24 Ingham 04 Smith 06 Parslow 16 Fyfield 23 Doig (Allen - 78' ) 08 Kerr 19 Potts (Oyebanjo - 78' ) 26 McLaughlin 33 Rodman (Reed - 66' ) 09 Walker 17 Blair Substitutes 01 Musselwhite 02 Oyebanjo 05 McGurk 12 Bullock 13 Smith 27 Allen 07 Reed