Mansfield manager Paul Cox described the club's first win over Chesterfield in 10 years as a victory for his team's character after a Calvin Andrew header ended the League Two leaders' unbeaten run.
Andrew ran the length of the pitch to celebrate in front of the Mansfield fans after powering in a 37th-minute corner for his first goal since he joined the club in the summer.
Chesterfield had plenty of possession and chances in front of a 10,000-plus crowd but could not find a way past keeper Alan Marriott who was inspired and the home side's frustration spilled over in stoppage time when Gary Roberts was red carded for stamping on James Jennings.
Cox said: "It was a magnificent defensive display because I thought we came up against the best team I've seen at this level of football.
"Paul (Cook) has put a team together that's going to take some stopping but all I can say about my boys is that they don't know when to lie down.
"They've surpassed everything that was expected of them and near the end we had two or three more chances plus I thought we had two stonewall penalties.
"I don't think we were very good in possession, the occasion got to us and we can play better with the ball, but in terms of heart and desire and giving everything for the cause I hope all the supporters who came here are really proud of them because I am and they deserve a pat on the back.
"Calvin is working extremely hard and he understands what is expected of him but I don't want to single out individuals because it was a proper team performance.
"I thought the way we set up defensively and worked as a team we deserved to win what was a pulsating local derby."
Chesterfield manager Paul Cook said: "Three points come and go every week but games like this are for bragging rights and unfortunately we've let our supporters down.
"But I think over a period of a couple of months and even in the performance here I don't think our supporters could feel let down because they could see the lads doing their best and trying to do the right thing.
"Some things don't go your way in football, we've been beaten by Mansfield and we've got to take it on the chin.
"It's tough and, believe you me, the next few days will be hard work. When we look at the league we are top yet we still feel like we've been relegated."
On the sending-off, Cook added: "Gary wants to deliver so much and sometimes when it's not your day and it's not working it leads to that and we've got to make sure we manage that properly. Gary is a great lad and that's totally out of character for him."