Mark Greaves scored the equaliser to take the game into extra time
Boss Colin Walker praised York's character after they beat Mansfield for the first time in four attempts this term in the Setanta Shield third round.
Mark Greaves scored a late equaliser to force extra-time and penalties after Emile Sinclair's opener, and Simon Rusk scored the winning kick.
Manager Colin Walker told BBC Radio York: "Did we deserve it? Well I'm going to take it.
"There were some fantastic guts from the players. They didn't give up."
Cannot play media. Sorry, this media is not available in your territory.
He added: "They didn't give the ghost up. We had [goalkeeper Michael] Ingham up at the corner that we scored from and I've just said to them that might just be the little bit of luck that we needed.
"We have dominated games and not got anything out of it. I thought we dominated the first half. I thought we set off really well and had loads of chances and should have been two or three up.
"I think we've got to have big praise for the young players, [defender Andy] McWilliams and [striker Adam] Boyes. I thought they did ever so well.
"I'm not saying we played that well at times. We started to rush things. But we didn't half show some guts at times.
"I'm dead chuffed for the players. There's been a lot of flack flying around and I'm dead chuffed for the players."
Bookmark with:
What are these?