Warrington Wolves ensured their Super League safety with a stirring victory over the Tigers at Wilderspool.
The Wolves followed up last weekend's win over fellow strugglers Halifax by ending Castleford's five-match unbeaten run and so denting the Tigers' hopes of a top-six finish and a place in the end-of-season play-offs.
And with Salford losing at home it means the Wolves will preserve their record of never having been out of the top flight.
Warrington made a whirlwind start and were 12-0 ahead after just seven minutes.
Lee Briers and Dean Busby combined to send Darren Burns over for the opening try and then winger Graham Appo sprinted 70 metres to touch down.
Briers kicked both conversions and also landed a penalty to give the Wolves a healthy 14-0 advantage.
The Tigers grabbed their first points of the game when Michael Eagar's clever pass allowed Waine Pryce to dive over in the corner.
Then four minutes before half-time Pryce turned provider when his pass out of the tackle over the Wolves line allowed Eagar to score and reduce the deficit to 14-8 at half-time.
Castleford's cause was not helped when loose forward Ryan Hudson was sin-binned four minutes into the second half for a late challenge on Briers.
And the Wolves immediately made their extra man felt when Appo grabbed his second try of the game which was soon followed by a try from hooker Jon Clarke which Briers converted to make it 24-8.
Two further Briers penalties and a drop goal saw the Wolves home as Eagar's second try late in the game was just a consolation for the Tigers.