Resurgent St Helens stretched their winning run to six matches by edging out Warrington Wolves 20-18 in a dramatic first game of the Super 8s on Thursday.
Saints enhanced their chances of sealing a Super League semi-final spot by edging out Tony Smith's side, who thought they had win it with time almost up but Rhys Evans' try was ruled out by the video referee as his foot was in touch.
Louie McCarthy-Scarsbrook took a pass from Jordan Turner before going over for the opening try and Saints led 12-6 at half-time after Jonny Lomax applied the finish following a break from centre Mark Percival, who converted both scores.
Daryl Clark came up with Warrington's solitary try of the first half and the home side were only two points behind when Jack Hughes celebrated his new contract by powering his way over just after the hour-mark.
Saints were more clinical than second-placed Warrington and Turner gave them breathing space with a third try, with Percival adding another two points from the tee to make it 20-12 with 10 minutes remaining.
Warrington continued to pose a threat and Ryan Atkins burst away for a try, converted by Kurt Gidley, eight minutes from time and almost snatched it in the closing stages when Evans was awarded a try before replays showed his boot had just touched the line.
Defeat for the Wolves came on the back of a hammering of Wakefield Wildcats that sealed their place in the Challenge Cup final and leaves them a point behind leaders Hull FC, while fourth-placed Saints have now won seven in a row at the Halliwell Jones Stadium.