|Warrington Wolves (6) 14|
|Tries: Westerman, Evans, Hughes Goal: Gidley|
|Castleford Tigers (8) 11|
|Tries: Solomona Goals: Gale 3 Drop-goal: Gale|
Jack Hughes' last-minute try helped Warrington beat Castleford Tigers to secure a Super League play-off spot.
Luke Gale looked to have sealed the match for Castleford when he landed a drop-goal with two minutes remaining to put the visitors 11-10 in front.
But Hughes added to earlier scores from Joe Westerman and Rhys Evans to win it.
Castleford, for whom Denny Solomona touched down in the first half, must win their last four games to stand any chance of finishing in the top four.
Warrington's next fixture is the Challenge Cup final against Hull FC at Wembley on 27 August.
Warrington head coach Tony Smith: "It was a tough game but Castleford are one of the best attacking teams in the country and have recently taken the scalps of Hull and Wigan.
"To keep them to one try was a big effort. That was probably their final crack at it but it seals our own position in the top four."
Castleford head coach Daryl Powell: "It's tough to lose like this and I don't think anyone could have argued if we'd won by a point.
"It was a war of attrition but we nullified Warrington's strength for most of the game. We are going to grow from this and the team has a big future."
Warrington: Ratchford; Russell, T King, Atkins, Evans; Gidley, Sandow; Hill, Clark, Sims, Currie, Hughes, Westerman.
Replacements: Dwyer, Westwood, G King, Bailey.
Castleford: Dorn; Hampshire, Crooks, Minikin, Solomona; Chase, Gale; Springer, Milner, Patrick, O Holmes, Savelio, Moors.
Replacements: Mariano, McShane, Cook, Millington.
Referee: Chris Kendall