|St Helens (24) 40|
|Tries: Fleming, Knowles, Amor, Thompson, McCarthy-Scarsbrook, Swift, Walmsley Goals: Walsh 5, Owens|
|Castleford Tigers (10) 16|
|Tries: Dorn, Hampshire, Maher Goals: Gale 2|
St Helens beat Castleford to confirm a top-four finish in Super League and complete the line-up for the play-offs.
Saints will face one of Warrington, Hull FC or Wigan in the semi-finals at the end of September, with a spot at the Grand Final on 8 October at stake.
The 2014 champions trailed the Tigers 10-6 but unanswered tries from Morgan Knowles, Kyle Amor and Luke Thompson put the hosts into a comfortable lead.
Louie McCarthy-Scarsbrook, Adam Swift and Alex Walmsley made sure of victory.
Saints, whose first try was scored by Matty Fleming, have not lost a home match to Castleford since 1992.
Luke Dorn and Ryan Hampshire registered first-half scores for Castleford and Will Maher added a late consolation, but prolific winger Denny Solomona ended the match still one short of Lesley Vainikolo's record for tries scored during a regular Super League season.
Vainikolo touched down 36 times for Bradford Bulls in 2004.
Castleford's cause at Langtree Park was not helped by injuries suffered by Solomona and second-rower Junior Moors, or half-back Rangi Chase being sent to the sin-bin just before the interval for tripping Jonny Lomax.
St Helens prop Alex Walmsley told BBC Radio 5 live sports extra: "It was a bit of a shaky start, but in the second half we were fantastic.
"It's nice to cement that top-four place, but we've always been looking above us.
"We haven't put a full 80-minute performance together all year, and if we can do that I'm sure we're going to hurt a few teams."
Injured Castleford captain Michael Shenton: "It was always going to be a tough ask, especially with a depleted squad.
"We've been fantastic in the Super 8s and really challenged the top teams.
"We started the game really well, but St Helens hung in there and were good enough to overpower us in the end."
St Helens: Lomax; Owens, Peyroux, Fleming, Swift; Turner, Walsh; Walmsley, Roby, Richards, Wilkin, Greenwood, McCarthy-Scarsbrook.
Replacements: Amor, Vea, Thompson, Knowles.
Castleford: Dorn; Hampshire, Crooks, Minikin, Solomona; Chase, Gale; Cook, McShane, Patrick, Webster, Moors, Milner.
Replacements: Maher, Fitzsimmons, Flynn, Douglas.
Referee: Jack Smith