Joe Clarke's brilliant 75th-minute solo goal lifted 10-man Wrexham two points clear at the top of the table in a fiery clash at Alfreton.
The teams were tied 1-1 at half-time after Neil Ashton had headed Wrexham ahead from close range, before Ben Tomlinson pounced for an equaliser.
Wrexham had Danny Wright sent off for a second booking in the 49th minute.
The Welsh team were not troubled though and Clarke's dribble and low shot gave Wrexham the points.
Alfreton manager Nicky Law and Wrexham assistant manager Billy Barr were both sent to the stands after separate disagreements with referee Michael Bull.
VIEWS FROM THE DRESSING ROOM
Alfreton Town manager Nicky Law:
"I think we started off the better team then they came back into it and got a poor goal from our perspective. Then again we came back into it and got a good goal and you think you are going to go on and win it.
"They get a man sent off, which is not always a good thing, but when they did we were just void of any ideas, void of anyone to go and make something happen.
"Nathan Arnold has had a glorious opportunity to put us 2-1 up but it doesn't go in and that just gives them a little bit more belief.
"Call it what you want, lack of belief, lack of skill, lack of killer instinct, whatever you want, but that is what we have shown.
"Yes it was against a side who have just gone on to 50 points and top of the table but for me there was nothing between the two teams. They have ground it out and we haven't. That's why we have got a little bit of a weakness."
Wrexham manager Andy Morrell told BBC Radio Wales: "He's [Clarke] produced something out of nothing there tonight and maybe that's the little bit of something that you need to win a game and get you right up in the promotion push.
"A fabulous winner and I thought we defended like lions today and with 10 men. I thought we were great.
"I said at half time nobody get sent off because we have to be 11 v 11 against a team like them. I'm more bothered about the first yellow he [Danny Wright] got than the second one he got.
"It's just petulance kicking the ball away. Players like giving me money. He'll be fined again and at some point it will go in that he just can't do it."