Barnsley winger Martin Devaney hit two extra-time goals to secure an FA Cup third round clash with Walsall after a pulsating replay.
Andy Ritchie's side did it the hard way after coming from behind twice to force extra-time, but they finished stronger and Devaney showed pace and composure to wrap up a hard-fought win 11 minutes from the end.
Bradford's recalled striker Andy Cooke showed his intent after just three minutes when his spectacular overhead kick flew wide of the target, but City were grateful for an offside flag when the dangerous Chris Shuker slotted home a six-yard effort.
Bradford's defenders were left flat-footed by Marc Richards' 13th minute knock-down and it looked a harsh decision when the assistant's flag cut short Shuker's goal celebrations.
With City skipper David Wetherall in commanding form at the back, the Bantams limited the visitors to a couple of first-half chances and keeper Russell Howarth pulled off fine saves to deny Shuker and Jacob Burns.
Bradford got their reward after 34 minutes when a Ben Muirhead corner was volleyed towards goal by Dean Windass and after the ball diverted off Danny Cadamarteri, Cooke jabbed it home at the far post.
Windass sparked some ugly exchanges with an ill-judged lunge at full-back Neil Austin and his reckless challenge seemed only to fire up Barnsley for the second half.
Just six minutes after the break Richards found plenty of space on the left wing and when Devaney failed to connect with his low cross Paul Hayes was waiting to slide the ball home from six yards.
Barnsley now had their tails up and eight minutes later they bagged a second when City failed to deal with a Shuker corner and centre-half Paul Reid reacted first to force the ball home with a close-range strike.
City refused to buckle and Cooke wasted two great chances before Mark Bower pulled them level with his first of the season.
This time Barnsley failed to do the basics at a corner and when Bradford skipper Wetherall headed towards goal his defensive partner powered on to the ball to head past the stranded keeper from eight yards.
Wetherall then got in on the act himself five minutes later when some slack Barnsley marking gave him the chance to send a looping header from another Muirhead corner past the shell-shocked Scott Flinders from 14 yards.
But City's hopes of holding out for a hard-earned victory lasted barely five minutes as Hayes was gifted time and space in the box to coolly slide the ball under Howarth.
Cooke had an injury time header ruled out for offside but the visitors held the upper hand for most of extra time.
A superb cross from Hayes drifted beyond Howarth for Devaney to head Barnsley back in front and he had too much for Bradford's tired legs when he sprinted clear after the change around to place a low shot past Howarth.