Jay Rodriguez scored his maiden goal for Wrexham to secure a 1-0 victory over Stockport at their home ground.
Rodriguez's goal, which came after his penalty kick was initially saved, proved to be decisive in clinching a hard-fought win for Wrexham against their rivals competing for promotion.
Stockport had the upper hand in the early stages of the match but, apart from a wayward shot from Isaac Olaofe, they struggled to create clear opportunities and fell behind just before the 30-minute mark.
Following a scramble in the box that resulted in Ibou Touray inadvertently handling the ball, referee Simon Mather awarded a penalty after consulting with his assistant.
Although Corey Addai managed to save Rodriguez's penalty, the striker reacted quickly to tuck away the rebound under the goalkeeper.
Stockport came agonizingly close to leveling the score seven minutes into the second half when Callum Connolly met Lewis Bate's delivery into the penalty area, only for Arthur Okonkwo to produce a fine save to push the ball onto the crossbar and out for a corner.
A swift counterattack by the home team saw forward Sam Smith break free and unleash a shot, but Addai was able to block Smith's powerful strike with his body.
In the closing stages of the game, Olly Rathbone missed a golden opportunity to make Wrexham's lead more comfortable when he directed his header wide from Ryan Longman's cross.
Stockport's hopes of securing a draw took a blow with 10 minutes remaining as Brad Hills received his second yellow card for a challenge on Rathbone, reducing them to 10 men.