An injury-time strike from Michael Jacobs breathed new life into Wigan Athletic’s promotion push by breaking the hearts of brave Bradford right at the death.
The visitors were the better side throughout, but once again were struggling to convert that dominance into something tangible on the scoreboard.
But with seconds remaining - and with promotion rivals Blackburn and Shrewsbury counting the seconds until the final whistle - Jacobs took delivery of a sublime flick from Will Grigg to smash home the only goal of a tight game.
It was only Wigan’s second victory in the last six - both finishing 1-0, both thanks to Jacobs goals - and sends Paul Cook’s men above Shrewsbury into second-place on goal difference.
It also reduces the deficit on League One leaders Blackburn to a mere five points, with Latics having three more games in hand.
Right from the off, Latics were the side most likely, with Jacobs racing purposely into the penalty area inside three minutes.
However, despite the attacker being brought down by Callum Guy, the referee ruled no penalty.
Nick Powell and Jacobs then combined to almost find James Vaughan, only for Bantams goalkeeper Colin Doyle to gather.
Only the width of the post denied Latics the opening goal on 15 minutes when Powell found Vaughan, who beat Doyle, only to see his effort come back off the woodwork.
Midway through the first half, Powell could and perhaps have done better from six yards, when he could only nod Gavin Massey’s cross over the bar.
With Bradford struggling to get into the game, Vaughan headed wide from a Max Power corner, before the striker - preferred to Grigg in attack - was unable to properly latch on to a nice ball from Callum Elder.
It was four minutes before half-time when Bradford had their first real glimpse of goal, only for full-back Tony McMahon to fire well over the top.
Latics received a massive setback shortly after the restart when Powell went down clutching his hamstring and - with one eye on Sunday’s FA Cup quarter-final against Southampton - he made his way straight down the tunnel, to be replaced by Grigg.
Jacobs then shot into the side-netting from a good position, before Ryan Colclough took over from Massey.
Latics goalkeeper Christian Walton was struggling to keep warm with virtually all of the play happening at the other end of the field.
But with the visitors unable to find what was always going to be the only goal, new signing Devante Cole took over from Vaughan inside the last 10 minutes.
Immediately, the January arrival from Fleetwood was in the game, and thought he’d managed to break the deadlock.
However, after good work from Power, a Bantams defender cleared his effort off the line.
Lovely stuff from Cole then almost released Jacobs, with the ball hitting the heels of the forward rather than rolling into his path - and it looked like Latics had run out of time.
However, as the game entered stoppage-time, Latics managed to work one more opening, and it brought about what could turn into the most valuable goal of the whole campaign.
Colclough’s cross was magnificently steered by Grigg into the path of Jacobs, who composed himself before firing low into the corner of the net - to send the Latics fans behind the goal into absolute raptures.