David Hopkin's Bantams finally overcame plucky National League side Aldershot Town in an Emirates FA Cup first round replay this Tuesday evening thanks to a 4-1 success on penalties.
After a goalless ninety minutes which saw Eoin Doyle have an effort blocked in front of goal and another strike disallowed for offside, City took the lead through an own goal by Aldershot defender George Fowler in the first period of extra time.
Aldershot substitute Luke Howell shocked City by levelling things up for the Shots, however, after the restart.
Howell's goal took the replay to penalties, but two stops from Richard O'Donnell from Aldershot's first two spot-kicks put City in the driving seat.
After Doyle - who has seen another goal disallowed for offside in extra time - Kai Bruenker and Lewis O'Brien had all converted, it was left to Jack Payne to score City's fourth successive penalty and book a trip away to Peterborough United in round two on 1 December.
Hopkin made just two changes to his side from the eleven that began the league encounter at Peterborough at the weekend.
Jim O'Brien and Daniel Devine came in for Hope Akpan and Paul Caddis, who was ineligible to play because he signed for the club after the original tie between Aldershot and City earlier this month.
In wet and windy conditions, the pattern of play was quite clear for the replay from the very off.
Aldershot were keen to get men behind the ball, sometimes all eleven, with the aim to try and frustrate their league hosts.
Doyle did nearly engineer an opening fifteen minutes in, though, when the unmarked Irishman met a near post corner from Payne.
Doyle sent his free header goalwards but the effort was blocked right in front of his own line by Lewis Kinsella.
Doyle had another header on goal later in the half from a Jim O'Brien cross, but the glancing attempt was comfortably gathered up by Will Mannion.
It took nearly half an hour for Aldershot's first serious threat on O'Donnell's goal, with Jacob Berkeley-Agyepong heading over from Dominic Bernard's centre.
Payne and David Ball - both of whom worked so tirelessly at Peteborough last Saturday - tried to combine just past the half hour mark but the latter's strike from inside the box was blocked away by Fowler.
A low-key opening period at the Northern Commercials Stadium ended with an effort from outside the box by Regan Booty deflecting wide off team-mate Adam McDonnell.
After lining up in a 3-4-1-2 formation for the first half, City changed shape for the restart, switching up to a 4-3-3 set-up.
The alteration nearly had the desired affect seven minutes into the second half, but Doyle was flagged for offside after tapping in from close range following Lewis O'Brien's low cross to the far post.
Payne then threatened twice with quick succession on the hour mark but both times his low drives were repelled by Mannion.
As Aldershot looked to hold onto their position in the tie and slow down City's advances, two of their players - Josh Lelan and Osho - were booked soon after for fairly obvious and deliberate fouls on Lewis O'Brien and Payne respectively.
Aldershot would receive seven bookings in total on the night - with the vast majority of them being as a result of similar late challenges.
With the Bantams looking to up the tempo at this stage, Ryan McGowan was replaced by Bruenker.
Two of City's other attackers - Ball and Doyle - linked up shortly afterwards but Doyle's shot from a Ball strike across the box was deflected narrowly over the bar.
Aldershot responded with waywards efforts from McDonnell and substitute Josh Barrett, but the Shots were remaining very much in survival mode as time ticked down towards the end of normal time.
A driven effort across goal by Devine had to be pushed away by Mannion, with Jim O'Brien firing wide with a strike from outside the box seconds later.
George Miller and Connor Wood were brought on by Hopkin in the latter stages of the second period to try and boost City's efforts in finding a way past Aldershot's heavily-manned defensive ranks.
Payne saw a low strike from just inside the box held by Mannion by his near post four minutes from the end of normal time.
The diminutive attacker and Doyle both had sights of goal in injury time, but Payne sliced his strike from a Wood cross.
Doyle then looked set to head in at the far post following Lewis O'Brien's centre but the striker seemed to be nudged off the ball.
City's lack of a breakthrough brought the introduction of extra time.
Not for the first time on the night, the Bantams thought they had finally found that vital opening goal four minutes into extra time - but again they were denied.
Jim O'Brien's ball into the box was volleyed forward by Miller.
Miller's effort was repelled by Mannion but Doyle slammed home the rebound.
Much to City's frustration, however, the flag had already gone up against Miller.
Four minutes before the break in extra time, though, City did eventually get the goal they were searching for.
Breunker's fierce strike into the box was deflected in at the near post off Aldershot defender Fowler past a wrong-footed Mannion.
That goal looked set to secure City's safe passage into the second round - but Aldershot weren't quite done yet.
The Shots shocked the Bantams three minutes into the second period of extra time when Aldershot sub Howell drove into box to fire low past O'Donnell.
A stunned City looked to fight back but Mannion produced smart saves to deny Miller and Lewis O'Brien.
Aldershot's rearguard efforts meant that City were forced to take the replay to penalties to try and claim that second trip to Peterborough in two weeks.
Doyle and Bruenker netted City's first two penalties, with O'Donnell adding to that boost by making saves from McClure and Osho.
Lewis O'Brien and McDonnell both scored from City and Aldershot's next penalties, meaning Payne had the chance to fire the Bantams through.
City's number ten made no mistake, sending Mannion the wrong way, to give Hopkin's side another morale boost going into a massive home game in League One with Oxford United at Valley Parade at the weekend.
Match updates, line ups and stats from the Aldershot cup replay can be found via the Match Centre - HERE.