Tommy Leigh and Rosaire Longelo scored the goals to end Wrexham’s eight-game unbeaten run in League Two as Stanley won 2-0 at a sold-out Wham Stadium.
The Welsh outfit dropped out of the automatic promotion places as John Coleman's men moved into seventh spot.
Wrexham started well and top scorer Elliot Lee had his header superbly tipped away by Jon McCracken in the 14th minute.
The visitors went close again in the 33rd minute when, with Stanley appealing for offside, Paul Mullin was clean through but his strike crashed off the crossbar.
The Reds took the lead from the penalty spot five minutes after the break. Wrexham’s second-half substitute Will Boyle was adjudged to have pulled down Brad Hills following a corner, and Leigh sent keeper Arthur Okonkwo the wrong way for his fifth goal of the season.
Stanley made it two in the 73rd minute when Okonkwo fumbled Jack Nolan’s long-range strike and Korede Adedoyin pounced with the ball falling to Longelo to fire into the empty net.
Wrexham had the chance to pull one back in the 98th minute after Hills fouled George Evans, but Mullin’s penalty hit the underside of the crossbar and bounced out to add to their misery.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here