Preston North End were on the wrong end of a Caraboa Cup shock as they were beaten by Accrington Stanley at the Crown Ground.
A dramatic finale saw three goals in the last seven minutes - two of those in stoppage-time - as the game swung one way and the other.
Accrington had taken a first-half lead through Ben Richards-Everton, before Jordan Hugill equalised in the 70th minute.
The home side went back in front with 86 minutes on the clock as Jordan Clark guided a shot home from close range - North End appealing unsuccessfully for a foul against Andy Boyle in the build-up.
As the contest moved into stoppage-time Hugill equalised for the second time, looping a header home from Sean Maguire's cross.
But with the game seemingly heading for extra-time, Accrington had other ideas, Billy Kee netting the League Two side's winner from close range.
Preston supporters made up well over half of the crowd, with 1,736 of them in a 2,879 attendance.
Most of them left soaked to the skin, stood in the rain on an open terrace - adding to their mood of disappointment.
North End boss Alex Neil had made nine changes from Saturday's win over Sheffield Wednesday, Chris Maxwell and Callum Robinson the two surviving starters.
Stephy Mavididi was given his North End debut after signing from Arsenal on loan, the teenager starting on the left side of a 4-2-3-1 system with Daryl Horgan on the right and Callum Robinson in the hole behind Hugill.
Stanley certainly started the better of the sides, a chance falling their way inside three minute when Tom Dallison's deep cross was headed back across goal by Jonny Edwards for Kayden Jackson to volley just over the bar.
Edwards put a header too high soon after as the home side maintained their lively start.
North End were indebted to a double save from Maxwell in the 14th minute, the keeper parrying a stinging drive from Sean McConville and then gathering Jackson's headed follow-up - the chance coming about through Paul Gallagher's stray pass.
Accrington took a 20th minute lead, Ben Everton-Richards spinning and firing home after a McConville free-kick had not been cleared.
While they looked shaky at the back, PNE began to get on the front foot going forward.
Liam Grimshaw slid a pass through the Accrington defence for Marnick Vermijl to chase on the right side of the box, the Belgian's first-time shot flying over the bar when more composure was needed.
Robinson, lively in the No.10 role, put a couple of shots wide from the edge of the box when he should have been testing Accy's debutante goalkeeper Simon Jorgensen.
North End's best chance of the first half came four minutes before the interval as they swept forward on the counter-attack.
Horgan burst into the box to latch on to Robinson's pass, the Irishman's shot pushed behind by Jorgensen.
Mavididi's evening ended in the 53rd minute, with Daniel Johnson replacing him from the bench.
Either side of the substitution, Robinson drove shots high over the bar and into the large travelling support behind the goal.
Stanley almost doubled their advantage in the 58th minute, a shot from Kee after the ball had been bobbling around the box following a corner, blocked by Vermijl in the six-yard box.
Robinson forced a diving save out of the keeper on the hour, a smart turn outside the box having opened-up the shooting chance.
Maguire was PNE's second change of the night, coming on for Grimshaw, and the recent arrival from Cork was involved in the equaliser in the 70th minute.
It came about through a great move on the counter-attack, Horgan starting it by winning possession just outside his own box.
He moved it forward to Robinson who fed a pass to Maguire, who in turn played it back to Horgan - his pass sending Hugill clear.
Hugill did the rest, running into the box and shooting right-footed across the keeper into the far corner.
Eight minutes after the goal, Gallagher's corner from the right was met in the air by Ben Davies but his header was saved by the diving Jorgensen.
Accrington regained the lead in the 86th minute, Jackson getting the better of Boyle as they challenged for a ball down the home side's left channel.
Boyle seemed to get a shove and went to ground but play went on, Jackson pulling the ball into the middle where Clark steered a shot past Maxwell from close range.
North End levelled a second time in the 91st minute and looked to have taken the tie into extra-time.
Maguire took a pass from Johnson, lifted a cross from the corner of the box over beyond the far post where Hugill rose to loop a header back across goal and into the far corner.
But less than two minutes later, the hosts netted their winner.
A corner from the right was headed goalwards by Dallison, with Kee getting the last touch with his head to take it over Maxwell into the roof of the net.
Even after that, North End had a couple of bites at the cherry of a third equaliser, Maxwell joining the attack for a corner which saw the ball bounce across the box a couple of times.
Accrington: Jorgensen, Forbes, Hughes, Richards-Everton, Dallison, Clark, Brown (Conneely 81), Nolan, McConville, Edwards (Kee 46), Jackson. Subs (not used): McLeod, Sykes, Sousa, Ogle, Chapman.
PNE: Maxwell, Vermijl, Boyle, Davies, O'Connor, Grimshaw (Maguire 65), Gallagher, Horgan, Robinson (Browne 80), Mavididi (Johnson 53), Hugill. Subs (not used): Woods, Huntington, Earl, Hudson.
Referee: Eddie Ilderton (Tyne and Wear)
Attendance: 2,879 (1,736 PNE)