Billy Kee was the Accrington hero as his injury-time goal saw off Championship side Preston 3-2 in the Carabao Cup.
In a frantic finale, there were three goals in the closing minutes with striker Kee scoring with almost the last touch of the game.
Stanley took the lead in the 20th minute when, from a Sean McConville free-kick, Preston failed to clear their lines and Ben Richards-Everton turned in the area and fired low and hard into the net for his first Accrington goal.
Preston, who made nine changes to the side which beat Sheffield Wednesday on Saturday, tried to come back into it with Callum Robinson firing wide from long distance on a couple of occasions. They should have equalised after 41 minutes with Daryl Horgan clean through but debutant Danish goalkeeper Simon Jorgensen pulled off a superb one-handed save to deny him.
Preston boss Alex Neil had seen enough by 50 minutes and put on striker Daniel Johnson as the visitors looked for the equaliser.
However it was Stanley who were the next to threat, with Kee's point-blank strike following a goalmouth scramble somehow kept out by Chris Maxwell on the line.
Preston's Robinson was denied by Jorgensen at the near post but the Dane could not keep out Jordan Hugill after 70 minutes. North End broke through Horgan who passed to frontman Hugill and he fired home the equaliser to make it 1-1.
Then came a frantic end to the game. Jordan Clark thought he had won the game for Stanley in the 86th minute when he slid home Kayden Jackson's cross.
However, in injury time, Hugill's header looped into the net from Sean Maguire's cross to level the scores.
There was still time for Stanley to grab the winner though, when a corner found Richards-Everton whose ball was flicked into the net by Kee.