Castleford made it four wins from four pre-season games thanks to Denny Solomona’s last gasp try on Sunday.
They looked to be heading for defeat when they trailed 18-16 to Widnes Vikings at the Mend-A-Hose Jungle but they came out on top when Solomona scored his second try from Luke Gale’s kick just after the final hooter sounded.
Castleford’s win came at a cost because Matt Cook pulled out of the game after he sustained a hamstring injury in the warm-up.
Mike McMeeken took Cook’s place in the starting line-up.
Tigers second-rower Oliver Holmes and stand-off Ben Roberts picked up injuries during the match.
The Tigers trailed 14-10 at half-time with their first-half points coming from tries by Solomona and Roberts.
They snatched the lead early in the second-half when great play by skipper Michael Shenton and Jordan Tansey saw Liam Finn cross and Luke Gale kicked his second goal.
The Vikings grabbed a two-point advantage when Paddy Flynn scored his second try three minutes from time but Flynn then knocked on from Finn’s high kick and Castleford capitalised with Solomona’s winner.
Rhys Hanbury and Kevin Brown were Widnes’ other try scorers in a match watched by 2,141 spectators.
Castleford: Dorn; Solomona, Gibson, Shenton, Carney; Roberts, Gale; Lynch, Moore, Millington, Holmes, McMeeken, Massey. Subs: Boyle, Milner, Wheeldon, Finn, Tansey, Crossley, Webster.
Widnes: Hanbury; Ah Van, Phelps, Marsh; Flynn; Brown, Mellor; Dudson, White, O’Carroll, Galea, Tickle, Isa. Subs: Hulme, Cahill, Joseph, Manuokafoa, Dean, Heremaia, Gore, Gilmore, Kavanagh, Leuluai, Craven, Gerrard, Clarkson.
Referee: Ben Thaler.