Chester needed a penalty shootout to edge past AFC Fylde in a dramatic FA Trophy first round tie.
Ross Hannah’s 52nd minute strike looked set to book Marcus Bignot’s side a place in the second round draw, but Serhat Tasdemir levelled up in the 90th minute for the visitors, forcing the tie into extra time.
Danny Rowe came off the bench to capitalise on Sam Hornby’s howler and give Fylde the lead but Lucas Dawson bagged a leveller, meaning the tie would be settled on penalties.
Ex-Wrexham winger Jonny Smith fired Fylde’s fifth penalty over the bar and Andy Halls successfully converted his penalty to secure a 5-4 victory in the shootout.
There were two changes for the Blues with Jordan Gough and Hannah coming into the starting line-up replacing the suspended Lathaniel Rowe-Turner and on-loan Crewe forward Daniel Udoh.
It was the two men brought into the team who combined in the third minute as Gough's low cross from the left wing was glanced on by Hannah but Ryan Astles couldn't connect with a finish.
On eight minutes, Hannah's through ball found James Akintunde who bore down on goal but could only poke his effort narrowly wide under pressure from Fylde keeper Rhys Taylor.
Simon Grand went close for the visitors with a low drive before smart handling from Sam Hornby relieved some of the pressure for the Blues.
Jack Muldoon showed good pace to get in behind Myles Anderson but his cross was well caught by Hornby.
Akintunde darted in between Fylde's defence on 15 minutes but his pull back only found George Edmundson who was able to easily clear with Hannah cutting a frustrated figure in the box.
Dave Challinor's Coasters – fresh from their FA Cup second round replay defeat at Wigan Athletic – carved a fine opening on 20 minutes as Matt Blinkhorn's header flashed wide from Jordan Richards' right wing cross.
Fylde surrendered possession in a dangerous area on 25 minutes and Sheffield-born striker Hannah lashed a sweetly-struck strike goalwards which was expertly tipped over the bar by Taylor.
Reece Hall-Johnson blazed a volley over the crossbar and just 60 seconds later was brought down by Grand with a rash tackle.
The tie hadn't really sparked into life so far but there was some decent football being played, and Fylde were next to go close as Richards' free-kick from 30 yards out dipped late as Hornby gathered at the second attempt. Mangan then fired a shot well over from a well-worked corner but the warning signs were there for the Blues.
Edmundson was fortunate to avoid a booking as he went through the back of Hannah, the centre-back recovering well to calmly nod Dawson's free-kick back to Taylor as referee Joseph Johnson brought the first-half to a close.
The Blues didn't have to wait long in the second period to open the scoring, as Hannah kept up his rich vein of form in front of goal.
Akintunde played a slick through ball into the 31-year-old's path and he did the rest, rounding Taylor and calmly finishing into the empty net to hand Bignot's side the lead.
Gough came off to be replaced by Andy Halls, while Astles' firm header flew wide from Dawson's whipped delivery.
Teenage defender James Jones avoided a caution for a rash challenge on Tom McCready, before Hornby did well to parry clear from Richards' powerful strike. Edmundson was cautioned for deliberate handball before Hall-Johnson also entered the notebook for a lunge on Richards.
Akintunde should've sealed Chester's progress on 72 minutes. Played in by Hannah, Akintunde left Grand on his backside with a tricky turn but took too long over his shot and Taylor managed to smother.
Hannah was next to be cautioned for hauling back winger Jonny Smith, before Luke Burke was also cautioned for a very similar offence on Hall-Johnson.
Serhat Tasdemir's shot was well blocked by Astles and looped up over the bar for a corner as Fylde pushed for an equaliser which would take the tie into extra-time after an agreement between the two clubs to settle it on the day.
Jason Taylor dragged a 25-yard drive well wide but as the game ticked into injury-time, Tasdemir was played in by Rowe and blasted a powerfully drive past Hornby to equalise.
The introduction of former Wrexham winger Smith had changed the game and he provided the cross which saw Rowe fire Fylde ahead, as Hornby dropped a clanger and spilt the cross into Rowe’s path and he hammered his shot home.
The Blues levelled up on 98 minutes in what was now a wide-open cup tie. Daniel Udoh challenged Taylor who managed to push the ball away but only into Dawson’s path, the midfielder producing a composed finish from 20 yards into the unguarded net.
Udoh should have fired Chester ahead on 110 minutes as he somehow managed to stab the ball inches wide from six yards out after a neat through ball from Dawson.
Hannah was played in by Udoh but Burke recovered with a superb last-ditch tackle before Fylde appeals for a penalty for a handball against Anderson were waved away by the officials.
Smith thought he’d won it for the visitors with a looping shot which dropped narrowly wide as the tie headed for a shootout.
The first four penalties from both sides were successfully converted but when Smith blazed his spotkick over the bar, Andy Halls stepped up to send the Blues into the second round.
Chester: Hornby, Astles, Anderson, Jones, Gough (Halls 57), Hall-Johnson, James, Dawson, Shaw (Turnbull 75), Akintunde (Udoh 82), Hannah; Subs not used: Lynch, Mahon.
Fylde: R Taylor, Richards, Grand, Burke, Edmundson, Blinkhorn (Smith 66), J Taylor, McCready, Mangan (Tasedmir 71), Muldoon (Rowe 80); Subs not used: Montrose, Tunnicliffe.