Yorkshireman Jordan Clark scored the winner 10 minutes from time to send Stanley into the second round of the Emirates FA Cup against League One high-fliers Bradford City.
Clark, from Barnsley, said his family and friends would be among the crowd at Valley Parade and he drilled a low shot into the bottom of the net for the winner.
Rommy Boco had given the Reds a 30th minute lead before Matthew Kilgallon equalised for the Bantams on 72 minutes which set up the late finale – although it ended with worry for Stanley with sub Shay McCartan stretchered off with a head injury.
John Coleman admitted he had never lost at Bradford – and once more it proved a happy hunting ground
It was a lively opening as, with just four minutes gone, Mark Marshall’s cross found the head of James Hanson with defender Mark Hughes clearing the effort off the line.
At the other end, Terry Gornell couldn’t get a clean shot on Sean McConville’s ball in with the striker six yards out.
Bradford’s Filipe Morais’s free kick was just wide while Rommy Boco tested Colin Doyle from 20 yards.
Winger Morais sent a free header off-target and Marshall fired wide from the edge of the area for Bradford but it was Stanley who came the closest on 16 minutes when Boco unleashed a fierce shot from 25 yards which rattled the crossbar.
The former Benin international though soon made one count on 30 minutes after good build-up play by Stanley with McConville’s ball in headed home by Boco at the far post – his sixth goal of the season.
Keeper Elliot Parish pulled off a superb save with his legs on 36 minutes to deny Haris Vuckic a certain equaliser while Hanson headed wide seven minutes before the break.
Stanley bossed possession immediately after the restart as they passed the ball around well limiting the Bantams to half chances in the opening 20 minutes of the half.
Bradford boss Stuart McCall made three substitutions early on and all had an influence.
Sub Jordy Hiwula squandered a chance on 65 minutes after being put through by fellow sub Nicky Law just six yards out. He claimed handball but referee Graham Salisbury was having none of it.
However they drew level on 72 minutes when another substitute Billy Clarke sent in a corner which Matthew Kilgallon headed home – with hints of a deflection.
Both sides looked for the winner and it came to Stanley on 80 minutes.
Boco headed to Clark who ran into the box and drilled it low into the bottom corner of the net to secure a cup upset.
However sub McCartan took a blow to the head in injury time and there was a long delay while he was stretchered off. Everyone at Stanley wishes Shay all the best.