Luckless Stanley bowed out of the Johnstone’s Paint Trophy after a narrow loss to holders Crewe Alexandra at Gresty Road.
The visitors dominated large periods of the encounter but could not make the breakthrough.
James Beattie made three changes to the side which lost to Burton Albion on Saturday.
Danny Webber returned from suspension, Luke Clark came in and youngster Ben Wilson started in goal whilst Kal Naismith and Peter Murphy sat out.
In meetings between the sides since 2009, this fixture has produced 23 goals and Stanley could have had two of their own after just 20 minutes.
Michael Richardson made the most of a stunning Webber flick but saw his close range effort cleared off the line by Crewe’s Gregor Robertson.
On twenty minutes, skipper Luke Joyce almost scored what would have been a contender for goal of the season when his 30-yard shot forced veteran Steve Phillips into a fine save.
In the build up to this clash, Crewe boss Steve Davis spoke of potential unrest in his squad and a host of loose passes and disjointed play supported this claim.
Moments later, Richardson was again in the thick of the action as he headed over the bar from a fine Michael Liddle left-wing cross and in the next move, Seamus McCartan could not believe his luck as he picked up another stray ball but could only fire over.
Michael Liddle enjoyed much freedom in the first half and shone defensively and offensively.
The Railwaymen’s first chance of note came in the 35th minute courtesy of the off balance Chuks Aneke, who found himself on the penalty spot but saw his shot fly high and wide.
The League One outfit came out of the traps at the start of the second half and began to get in behind the Stanley backline.
Beattie’s men were under the cosh but defended resolutely.
Just shy of the hour mark, substitute George Miller had the travelling fans on their feet when he unselfishly cut the ball back, found Richardson who dragged the ball wide from 15 yards.
There was a let off for the visitors when young stopper Wilson, largely untroubled all evening, spilled the ball and needed a last ditch defensive intervention off the toes of replacement Ajay Leitch-Smith.
Davis threw on former Stanley man Lee Molyneux in the hope of breaking the deadlock.
Stanley’s poor luck continued as the influential Liddle limped off with just under 15 minutes remaining after Beattie had made all his substitutions.
And, on 79 minutes the home side took the lead from Aneke’s rising header after Stanley failed to clear a cross into the box from the wing vacated by the injured Liddle.
Buoyed by the goal, Crewe aimed to take full advantage of the extra man and continued to attack.
Molyneux was kept largely quiet by the Stanley backline but his low dangerous left-wing cross had Stanley hearts in mouths when it was missed by an attacker late on.
Four additional minutes were added and Crewe almost sealed their passage into the second round when Leitch-Smith was found by a fine pass but saw his superb volley fly wide.
Although understandably deflated at the final whistle, Stanley return to Lancashire with their heads held high after controlling proceedings against a higher ranked side.
Stanley: Wilson, Clark, Aldred, Atkinson, Liddle, Mingoia, Richardson, Joyce (Miller 46,), Gray, McCartan (Mahoney 61), Webber (Hatfield 68)
Subs: Bettinelli, Hatfield, Miller, Mahoney, Jenkins