Blackpool struck an 88th minute winner at the Wham Stadium to defeat Stanley in the Checkatrade Trophy.
Following a bright Reds opening it was Blackpool who took a first-half lead courtesy of Danny Philliskirk's low strike.
But Erico Sousa levelled just minutes later heading home his first goal for the club, capping an impressive performance by the winger.
As the game appeared to be heading for a penalty shoot-out Max Clayton popped up at the back post to stab home his first Blackpool goal and secure his side victory.
Mekhi McLeod made a lively start, as he looked to seize his starting opportunity, straight from kick-off the tricky winger drove at the Blackpool defence and found Tyler Forbes who blazed his effort over the bar.
In just the third minute McLeod was in the thick of the action once more, another lightning run was followed by a shot on-goal which was deflected just wide of the post.
Blackpool's first venture forward came courtesy of a well-worked free-kick routine that saw Max Clayton drill an effort inches wide of the post with Stanley keeper Aaron Chapman rooted to the spot.
Sousa thought he'd put the Reds in-front in the 20th minute with a curled free-kick that clipped the bar before Mallik Wilks fired an effort wide just seconds later.
After a bright Accrington start their League One opponents began to see more of the ball and opened the scoring through Philliskirk in the 33rd minute, drilling a low shot from the edge of the area through a sea of bodies and into the bottom corner.
That lead lasted just six minutes as Stanley's wingers combined to draw the home side level, McLeod whipped a low ball across the face of goal for Sousa to stoop down and head home his first goal for the club.
Wilks fashioned out the first chance of the second period with a fantastic piece of individual play, he turned well outside the area but couldn't keep his shot down.
At the other end, Scott Quigley forced Chapman into a low save but he could only parry the effort straight at Clayton who took aim but couldn't find the target from close range, to Stanley's relief.
The second-half burst into an end-to-end affair, with Wilks and Tom Dallison going close for Stanley, before Quigley was again denied this time by a superb Dallison last-ditch tackle.
Great play by the impressive Sousa slipped Wilks through on goal once more, but the striker hit the post after it appeared he had done enough to beat Chris Mafoumbi in the Seasiders goal.
Blackpool found a late winner courtesy of Clayton who atoned for his earlier miss, prodding home via the post in the 88th minute.
Attendance: 975 (191 away)