Mark Hughes' Bantams left it late to seal a dramatic three points over Northampton Town, as a stoppage-time winner from Romoney Crichlow secured a vital 2-1 victory at Sixfields Stadium.
Andy Cook opened the scoring just after the half-hour mark, as his header saw him hit the 30-goal mark in all competitions this season, with his 50th goal for the Bantams.
City were pegged back in the second half by Max Dyche before a late stoppage-time header from Crichlow handed the away side a crucial three points going into the final two games of the season.
The visitors started off strong and came close to opening the scoring inside the opening two minutes.
After some neat interplay between Liam Ridehalgh and Thierry Nevers, the former whipped a cross into Cook, who’s chested-down shot rolled inches past the post.
The Cobblers created little in the first 20 minutes. Captain Sam Hoskins came close, but his left-footed effort was straight at City No.1 Harry Lewis.
Coming up to the half-hour mark, the home side started to pile pressure on the Bantams, forcing numerous corners, but nothing concrete came with regards to chances.
City deservedly took the lead on 30 minutes, as Cook became the first player since 1983 to score 30 goals in a season in claret and amber.
Scott Banks whipped his corner into a dangerous area, where Cook rose to head the ball past Lee Burge, giving the Bantams the lead and making their No.9 only the 29th player to net 50 for the club.
City started off the second half well, in an attempt to double their advantage.
It was the hosts who came closest in the opening 15 minutes of the second period, though. Kieron Bowie’s effort was excellently saved by Lewis - keeping City’s lead intact.
Jon Brady's men continued to push for an equaliser, and Dyche provided just after the hour.
A free-kick floated to the back post was headed back into the middle by Sam Sherring, which was met by the defender to level the score.
The hosts would have doubled their lead if not for a wonder save from Lewis, as they continued to pile the pressure on City.
Bowie’s headed effort look destined for the back of the net, but Lewis sprung to claw it out, before watching Hoskins' half-volley clip the top of the crossbar.
The Bantams stood firm, however, and were rewarded for their efforts in dramatic fashion in the fourth minute of stoppage time.
Romoney Crichlow sealed all three points, as he met Cook's knock-down from Richiw Smallwood free-kick to scramble home and send close to 1,000 travelling Bantams in the away end into delirium.
Hughes' men head back to West Yorkshire with all three points - with their eyes set on Wednesday's game in hand against Crewe Alexandra.
CITY: Harry Lewis, Brad Halliday, Liam Ridehalgh, Richie Smallwood, Andy Cook, Jamie Walker (Matt Derbyshire 79’), Alex Gilliead (Adam Clayton 90+2’) Scott Banks, Romoney Crichlow, Thierry Nevers (Dara Costelloe 58’), Sam Stubbs. Subs not used: Colin Doyle, Matty Platt, Tolaji Bola, Emmanuel Osadebe.
GOALS: Andy Cook (30’), Romoney Crichlow (90+4’).
NORTHAMPTON: Lee Burge, Sam Sherring, Sam Hoskins (C), Louis Appere (Harvey Lintott 63’), Mitch Pinnock, Marc Leonard, Will Hondermarck, Shaun McWilliams (Danny Hylton 84’), Kieron Bowie, Ryan Haynes, Max Dyche. Subs not used: David Norman, Josh Eppiah, Paul Oset, Tete Yengi, Tom King.
GOALS: Max Dyche (64’).
ATTENDANCE: 7,786 (948 City supporters).