The Tigers completed a fine second half comeback at The Jungle to stun Halifax and pick up both Super League points.
Cas trailed 14-8 at the break but did not concede a point in the second half, crossing for six tries to their opponents' two as they extended their lead over the ninth-placed Blue Sox to six points.
The turnaround - aided by two tries apiece from Waine Pryce and Michael Smith
and seven goals from Wayne Bartrim, enabled Tigers to avenge their 19-8 defeat
at Halifax three months ago, and stay in the hunt for a top six finish.
Castleford's Andy Lynch sent fellow prop Nathan Sykes over after seven
minutes, but referee Karl Kirkpatrick ruled the pass was forward.
Both sides made plenty of errors in an untody opening spell before the Togers
broke the deadlock in the 12th minute when second rower Mike Smith plunged over
for a try Bartrim improved.
The Blue Sox levelled four minutes later when Robbie Beckett shot in for a try
which teenage scrum-half Liam Finn improved.
Debutant Finn was on target again four minutes later to edge Halifax ahead but
the Tigers squared matters with Bartrim's second goal after John Lawless was
penalised for a high tackle.
Castleford wasted two excellent chances in three minutes when Barrie Jon
Mather threw out a bad pass to Jon Wells and Lee Harland failed to take Danny
Orr's pass.
The Blue Sox then regained the lead in the 31st minute when Lawless went over
and Finn tagged on his third goal.
An incident in which Halifax full-back Stuart Donlan was flattened was put on
report, before the Tigers levelled at 14-14 two minutes into the second half
when full-back Darren Rogers went over.
The home side grabbed the lead four minutes later when winger Pryce rounded
off a lovely move.
Halifax were out of luck in the 54th minute when Finn struck a post with a
penalty goal.
Pryce then struck again in the 64th minute when Michael Eagar made the opening
for him to collect his second touchdown.
Eagar and Smith added further tries as the Tigers ran out easy winners in the
closing stages.
Referee Kirkpatrick also put on report a second-half incident in which Halifax
substitute Jamie Bloem was allegedly bitten by a Castleford player.