Two late goals saw AFC Blackpool through to the second round of the Macron Cup with a 3-1 win at Stone Old Alleynians.
Conah Bishop opened the scoring late in the first half, before the home side equalised early in the second half.
However, a brace from Ben Bradley secured the victory for the Mechanics.
In an entertaining encounter, the home side was awarded a penalty after 20 minutes but Matt Thomas hit the bar and the AFC defence got the ball clear.
AFC then took the lead through Bishop but, just three minutes into the second half, the home side levelled with a goal from Jack Tomlinson.
A double substitution saw Danny Pickering and Dan Mottram replaced by Jack Taylor and Carnan Dawson as AFC looked to restore their lead.
Bradley did that in the 70th minute, heading home from a good cross, before the home side had a goal disallowed.
Martin Baird came on for Alex Caunce as AFC looked to see the game out and Bradley ensured victory with his second goal coming in the third minute of stoppage time securing a place in the next round.
Up next for AFC is a derby game at Longridge Town on Wednesday; kick-off is at 7.45pm.
AFC Blackpool: Cameron, Donaghy, Betteridge, Caunce, Hall, Pickering, Mottram, Fishwick, Bishop, Finlayson, Bradley. Subs: Dawson, Taylor, Baird.