Mateusz Hewelt saved the 26th penalty in a mammoth shootout as Tranmere came from 2-0 behind to draw 2-2 and win 12-11 on penalties against Sky Bet League One side Accrington.
Stanley led 2-0 before Tranmere grabbed an equaliser through Paul Lewis with almost the last kick of the game.
It went to penalties and Hewelt saved Joe Pritchard’s effort while his counterpart Lukas Jensen kept out Rhys Hughes before it went to sudden death.
Hewelt then saved Shaun Whalley’s spot-kick as the players stood up to take them for the second time and League Two side Rovers celebrated being in the draw for the second round.
Two quickfire goals gave Stanley a 2-0 lead. In the 37th minute Tranmere lost the ball in midfield, with Korede Adedoyin nipping in, tricking his way into the area and firing into the far corner of the net.
Two minutes later on-loan Everton defender Ryan Astley received the ball on the edge of the area with his back to goal and, on the spin, his effort hit the inside of a post and crept into the net.
Rovers got one back on 62 minutes when, in a quick breakaway, Josh Hawkes got the ball midway in the Stanley half, raced into the area before beating the Stanley defence and firing home.
Then, in the third minute of second-half stoppage time and with virtually the last kick of the game, Lewis slid in at the far post to take the game to penalties.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.