A LAST-gasp Paul Mullin header spared Stanley's blushes in the FA Trophy after a lack lustre performance at Conference South bottom club Carshalton.
The Reds never got going in the second round clash despite being expected to see off the Robins - who have won just two league games all season - easily.
Their top scorer Luke Fontana had two good chances in the first few minutes with only keeper Rob Elliott keeping him out.
And, on just eight minutes, a Michael Johnson corner was headed into the net by Tchakounte Armel despite the best efforts of Andy Tretton - making his first competitive start for the Reds - to head it off the line.
Ian Craney was the only player to show real urgency and he got the equaliser on 29 minutes when he rifled the ball low and hard from 20 yards into the bottom of the net.
Mark Marshall was a problem on the right wing for Carshalton and he was involved in a move which ended with Daniel Nwanze producing a one handed save from Elliot on 78 minutes.
But two minutes later Craig Dundas broke, Elliot brought him down and it should have been a penalty but the ref waved play on and Johnson finished the move with ease to make it 2-1 - and somersaulted his way through the celebrations.
It looked like a shock win until. in injury time, Stanley were handed a free kick after Nwandze was sent off for a second bookable offence for allegedly shouting "man on" when Craney was lining up to shoot.
Peter Cavanagh's initial shot was saved by the keeper but it was easy for Paul Mullin to finish from four yards.
It was agony for Carshalton who deserved the win and referee, Mr Beck, had to run a gauntlet of hate as he made his way to the dressing rooms at the War Memorial Sports Ground.
"We got out of jail," said manager John Coleman. "It was a wake-up call for what happens if we don't play well. We can never let our guard down."
The replay is Tuesday this week at the Interlink.