Beaten Capital One Cup finalists Bradford will make a second trip to Wembley this season after defeating Burton Albion in their League Two play-off semi-final.
The Bantams went into the tie needing to overturn a 3-2 deficit from the first leg and levelled the aggregate score when Nahki Wells pounced on an error.
James Hanson then put City ahead overall, before Jacques Maghoma made it 4-4 from the penalty spot just five minutes later, but Wells got his second almost instantly after that to give Phil Parkinson's men the victory.
Bradford made three changes from the team that lost the first leg at home on Thursday as Andrew Davies, Nathan Doyle and Kyel Reid replaced Michael Nelson, Ricky Ravenhill and Will Atkinson. Albion, meanwhile, were unchanged.
Despite Gary Rowett's side's bright start, in which Maghoma, Alex MacDonald and Robbie Weir all had efforts at goal, it was the visitors that took the lead out of nowhere with just under 30 minutes played.
Marcus Holness attempted to simply head James Meredith's long ball back to keeper Stuart Tomlinson but judged it badly and Wells was able to intercept and open the scoring with ease.
There was little other action in the first half, apart from Weir testing Bantams keeper Jon McLaughlin from the edge of the area. Five minutes after the break, however, Bradford doubled their lead.
Wells was involved again as his good work created a shooting chance for Hanson, who duly beat Tomlinson in the hosts' goal.
However, the 4-3 aggregate lead didn't last long. Maghoma was awarded a penalty after being felled in the area by Garry Thompson five minutes later, with the midfielder then tucking the spot-kick away himself.
But, just two minutes after conceding, the visitors then hit back once more. It was direct stuff from Bradford as keeper McLaughlin sent a long ball into their opponents box, with Hanson nodding it down to Wells who was on hand to bag his second of the match.
The Brewers almost swayed the tie back in their favour through Billy Kee, but McLaughlin saved his headed effort.
Hanson then had a good chance to make the result safe for the visitors but fired off-target from close range, and he was almost made to pay for the miss when Zander Diamond had a good chance at the other end.
However, the Bradford man made amends and blocked the shot as Parkinson's side just about secured the important win in dramatic circumstances to set-up a Wembley date with either Northampton or Cheltenham.