St Helens ended the regular Super League season on a dramatic high when scrum-half Danny Richardson kicked a penalty from inside his own half to snatch a 14-12 victory over Warrington.
After coming from 8-0 down at half-time to lock the scores at 12-12, the table-toppers looked certain to suffer a first defeat in 14 matches as the Wolves camped inside their 20-metre area for the last 10 minutes.
But Tyrone Roberts and Stefan Ratchford missed three drop-goal attempts between them in a frenzied finale and Richardson showed his composure when his side were awarded a penalty after the final hooter had sounded.
It means St Helens are guaranteed to finish the regular season at least 10 points clear, emulating the feat of Castleford 12 months ago, while Warrington suffered a blow to their hopes of claiming a home semi-final.
There was little sign of the drama to come as Warrington made a whirlwind start with scrum-half Roberts and hooker Daryl Clark causing all sorts of problems for the home side.
Roberts and Ben Westwood were both brought down short of the line before prop Mike Cooper, showing the form that earned him an England recall, squeezed a pass out of a three-man tackle to get Clark over for the only try of the first half.
Clark almost had a second when he was held up on his back over the line by full-back Ben Barba, who had spurned a glorious chance at the other end when he was tackled by winger Tom Lineham with two men on his outside.
Lineham's scrambling effort typified his side's determination to keep their line intact throughout an absorbing first half, particularly during a frenzied period in which Saints were awarded three successive penalties on their line.
From one of them, Saints captain James Roby was held up on his back and the only other points before half-time came from the boot of Roberts, who kicked a 40-metre penalty for a high tackle by Jon Wilkin to add to his earlier conversion.
Impregnable on their own line, it took a brilliant long-range effort to breach the Wolves defence a minute into the second half, as stand-off Jonny Lomax produced a half-break on halfway to release Mark Percival and Barba was in support to claim his 23rd try of the season.
Richardson's conversion cut the deficit to two points but it became six courtesy of the boot of Roberts, who kicked two more penalties early in the second half, one of them again from 40 metres out.
Warrington had a chance to pull clear when winger Josh Charnley regathered the ball from Roberts' high kick to the corner but had it stolen from his grasp by Barba and it proved pivotal.
Saints worked their way upfield and, after opting to run another penalty from in front of the posts, their enterprise paid off when Lomax took an inside pass from Zeb Ta'ai to shoot over for their second try.
Richardson levelled the scores with his second goal and powerful prop Luke Thompson went close to putting Saints in front for the first time when he lost the ball over the line.
In a tense and feisty finale, Roby came to his side's rescue by charging down Roberts' drop-goal attempt and Richardson made a poor attempt from inside his own half.
Roberts and Richardson were then both off target with their second attempts and Warrington full-back Ratchford also missed a one-pointer as the game appeared destined to end in a draw until Richardson's late winner.