A Rangi Chase masterclass ended Bradford's top-eight hopes and finalised the make-up of the Super League play-off series as Castleford ran out 46-34 winners.
Castleford withstood a late onslaught by the visitors to secure a nail-biting victory which means both Hull and Hull KR will participate in the end-of-season play-offs, which the Bulls will miss out on for the fifth successive year.
Trailing 40-24, Bradford struck back with late tries from Elliot Kear and Danny Addy to cut the gap to just six points before Jamie Ellis' try in the last move of the game finally settled the 14-try bonanza.
Jarrod Sammut scored two of the Bulls' six tries to help offset the absence of Luke Gale, who was a late withdrawal with a hamstring injury, but was overshadowed by another mercurial performance from Chase under the watchful gaze of England coach Steve McNamara.
The 2011 Man of Steel may only have two games left of his Castleford career, as he prepares for a move to Salford, but he looks determined to leave an indelible mark on the Tigers after scoring one try and playing a role in five others.
Bradford looked especially dangerous in the opening stages, with winger Jamie Foster bundled into touch just short of the line before Sammut took Manase Manuokafoa's offload to scoot over for the opening try, his 17th of the campaign which Foster goaled.
Sammut looked to have scored a second, only to have his effort ruled out for a forward pass, and Castleford stormed back with three tries in 10 minutes, with Chase inevitably at the heart of all of them.
Right winger Kirk Dixon collected the stand-off's kick over the Bradford defence to touch down before Chase combined with Grant Millington to get hooker Adam Milner over for the first of his two tries.
Dixon's conversion brought up the 1,000th point of his career and he was also on target after more magic from Chase deep inside his own half got his captain Michael Shenton into space and blockbusting winger Justin Carney produced a trademark finish to the 70-metre move for his 18th try of the season.
Bradford halted their opponents' momentum when full-back Brett Kearney took an offload from Addy as the Castleford defence hesitated to score their second try and, as they piled on the pressure, both hooker Adam O'Brien and centre Keith Lulia were held up over the line.
Milner scored his second try on the stroke of half-time, finishing off a break by the dangerous Daryl Clark, and Dixon's third goal made it 22-12.
As the game continued to flow from end to end, Bulls prop Nick Scruton kept his side well in contention by displaying some neat footwork to score his second try of the season and Foster kicked his third goal.
Chase then mesmerised the visitors' defence with a series of dummies before slicing through for a solo try and produced a delightful kick for full-back Jordan Tansey to touch down.
Dixon's fifth goal extended his side's lead to 34-18 but Sammut scored his second from the re-start to keep Bradford in touch.
Castleford were reduced to 12 men on 68 minutes when substitute Charlie Martin was sin-binned for unsportsmanlike conduct in preventing a quick 20-metre re-start but forward Nathan Massey extended his side's lead with a 70th-minute try.
The Bulls threatened to have the final say when Kear and Addy went over for tries in the last five minutes and Kearney went close to touching down Addy's pass.
But the Tigers clung on and enjoyed the final score when scrum-half Ellis finished the last move of the match.