St Helens sent Wakefield plunging to their ninth successive defeat as they warmed up for the Super League semi-finals in mixed fashion.
A second-half hat-trick from Shannon McDonnell sealed the win for Saints who finish fourth in Super League.
Saints led 12-6 at the break after taking the lead with a converted try from Louie McCarthy-Scarsbrook.
Wakefield replied with a Craig Hall touchdown before Jack Owens crossed in the corner for the hosts.
McDonnell’s hat-trick dashed the Wildcats’ hopes of ending their season with a shock win before Theo Fages added a late St Helens try.
Luke Walsh booted four goals but Saints will need an improved show to reach Old Trafford in a fortnight.
Saints welcomed back Jonny Lomax and Mark Percival with Fages and Oliver Davies also included after missing the derby win at Widnes.
They replaced Adam Swift, Matty Fleming, Greg Richards and the rested James Roby with Saints starting with big guns Alex Walmsley and skipper Jon Wilkin on the bench.
It was an emotional home send-off for Jordan Turner, playing his last game at Langtree Park before heading for Canberra Raiders.
Opposite number Hall also lined up for his farewell appearance – the 200th match of his career – for Wakefield before joining the Toronto Wolfhounds.
Recent history was on Saints’ side with eight successive victories since their last defeat by the Wildcats in 2012.
Wakefield had also conceded 44 points in both of their defeats by Keiron Cunningham’s men this season.
The visitors knew they could not finish higher than eighth –still their best position for four years despite the recent losing sequence.
Wakefield were forced into a late change with Ben Harrison dropping out and Anthony Tupou promoted from the bench.
The Wildcats briefly lost Mikey Sio for a concussion assessment after only two minutes but were the first to impress with a darting run from Hall before he was barged into touch.
Wakefield were far from overawed and stifled St Helens with strong defence. But Saints finally broke the deadlock midway through the first half when Kyle Amor sent McCarthy-Scarsbrook barging over after Atelea Vea was held short. Walsh tagged on the conversion.
Back-to-back penalties enabled Wakefield to pressure Saints with Hall strolling over after a deflection but Liam Finn missed the kick.
It was a poor show by Saints with unforced errors frustrating their fans. But they did string enough passes together just before the break with Walsh and Wilkin involved before Owens took a long ball from Lomax to go over in the corner and Walsh converted.
Finn struck a penalty for Wakefield on the stroke of half-time to cut the gap to 12-6.
Joe Greenwood went over early in the second half from a Lomax pass but the effort was disallowed.
Wakefield lost Jordan Crowther for a concussion assessment before Joe Arundel lost his footing to be rounded by McDonnell who sped away to score in the corner. Walsh added the touchline conversion to stretch the lead to 18-6.
Jordan Turner saved a try with a tackle on Jon Molloy as Wakefield strove to get back into the contest.
A missed tackle by Dominique Peyroux on Sio allowed Hall to chip ahead for Johnstone to touch down with Finn’s conversion making it 18-12.
Wakefield’s enthusiasm never waned with Joe Greenwood pushed into touch by a clutch of defenders.
Saints did manage a third try with Turner slipping Reece Lyne’s tackle for McDonnell to go over again to stretch the lead to 22-12.
McDonnell completed his treble 10 minutes from time again courtesy of Turner.
Fages danced over for a solo effort three minutes from time.
St Helens: Lomax, McDonnell, Percival, Peyroux, Owens, Turner, Walsh, Vea, Knowles, Amor, McCarthy-Scarsbrook, Greenwood, Thompson. Subs: Walmsley, Wilkin, Fages, Davies.
Wakefield: Jowitt, Johnstone, Lyne, Arundel, B. Tupou, Hall, Finn, Simon, Sio, Fifita, Molloy, Ashurst, Harrison. Subs: A. Tupou, Arona, Crowther, Yates.
Referee: Joe Cobb (RFL).