Jason Walker scored at the death to earn York a point against Chesterfield in League Two.
The Spireites opened the scoring through Sam Hird, who tapped home his first goal for the club.
Michael Coulson drew the sides level shortly afterwards when he latched on to Walker's pass and finished well.
Craig Westcarr put the visitors ahead again following a breakaway run, but Walker's acrobatic effort deep into stoppage time made it 2-2.
VIEW FROM THE DRESSING ROOM
York City manager Gary Mills told BBC Radio York:
"Absolutely fantastic. Some things never change, we don't give up, we never give in. We've built that in the dressing room.
"We certainly built it last season and we've brought it into this season. It was one of those that you just felt one might drop and I was happy to see four minutes.
"We got there. It's a great point for us.
"I always feel we're going to have a couple of chances and we've got to stick them away when we do."
Chesterfield caretaker manager Tommy Wright told BBC Radio Sheffield:
"We did ever so well on a hot day and it looked like we had got through it.
"We looked comfortable at times, and I thought on the counter attack we looked quite dangerous.
"I'm frustrated and I felt like we deserved the three points."