St Helens survived a late Warrington fightback to inflict a second defeat of the season on the Super League leaders.
Warrington led 14-12 at the break through tries from Kevin Penny, Ryan Atkins and Ben Currie, with Kyle Amor and Jack Ashworth scoring in reply.
Tries from Matty Dawson and Morgan Knowles, and a Luke Walsh drop-goal, appeared to have sealed it for Saints.
Penny’s second try and Tom Lineham’s score late on set up a grandstand finish but St Helens held on.
Having started the season with seven successive wins, Tony Smith’s Warrington have now lost two of their last three games and will see Wigan draw level with them at the top of the table if the Warriors win at Wakefield on Sunday.
They outscored Saints, who have now won on their last six visits to the Halliwell Jones Stadium, five tries to four but landed only one conversion, which proved crucial.
St Helens, who had lost three of their last four games, put Wolves under early pressure only to see the home side score twice as Penny leapt highest to claim Stefan Ratchford’s hanging kick and touch down one-handed before Atkins burst past Walsh to score.
Amor made an instant impact off the interchange bench as St Helens hit back, before Ashworth’s first Super League try gave them the lead.
Currie went in at the corner with the last play of the first half to put Warrington back in front but St Helens opened up an 11-point lead as Dawson and Knowles touched down, with Walsh adding a penalty following an injury to Jon Wilkin and a drop-goal.
After Penny grabbed his second, Lineham went over with around 90 seconds left. And although Warrington chose not to attempt the conversion to give them time to fit in another set of six, they could not find a sixth try.
Warrington coach Tony Smith: “I saw a couple of signs in the second set in defence that we were a little bit off, some signals that we didn’t have some of that sharpness that we’ve had, particularly about our defence.
“I thought we inflicted a bit of pain on ourselves with the amount of errors we made, but I don’t want to take anything away from Saints.
“Saints delivered everything we expected, we just didn’t have that spark to stop it. They had a spring in their step this week. They were quicker to the punch when they needed to be and also slowed it down when they needed to.
“There were aspects of the game we needed to control that bit better. We just weren’t at our best and we needed to find that energy for longer periods rather than in the last six minutes.”
St Helens coach Keiron Cunningham: “It was the same performance we’ve put together for the last three weeks. If you persist and keep doing the right things, you make your own lucky in rugby league.
“I thought we were on the end of some really tough calls in the first half, but we fought against that, got a lead and hung on to to it. I’m proud of my players.”
Warrington: Russell, Penny, Currie, Atkins, Lineham, Gidley, Ratchford, Hill, Clark, Sims, Westwood, Hughes, Westerman.
Replacements: R. Evans, G. King, Jullien, Philbin.
St Helens: McDonnell, Owens, Turner, Dawson, Spedding, Fages, Walsh, Walmsley, Roby, Savelio, McCarthy-Scarsbrook, Ashworth, Wilkin.
Replacements: Amor, Richards, Thompson, Knowles.
Referee: Ben Thaler (RFL)