St Helens stunned Wigan Warriors with a 23-4 victory at the DW Stadium which kept their top-four hopes alive.
The hosts had a chance to snatch top spot with victory had Hull FC slipped up at Salford Red Devils, but were on the receiving end of a classic smash-and-grab raid.
Mark Percival put Saints ahead with an early goal but Wigan went in front when Lewis Tierney chased down George Williams' grubber in the corner for the game's opening try.
The visitors equalised through the boot of Percival, but the hosts continued to dominate the early exchanges.
However, Percival burst through on 33 minutes against the run of play and Morgan Knowles grabbed a loose ball to cross five minutes later to send Saints in to half-time 16-4 ahead.
Sam Tomkins thought he had narrowed the deficit in the second half only for the try to be overturned after the video referee correctly adjudged that he had been superbly held up by Joe Greenwood.
A Luke Walsh drop-goal seven minutes from time settled the contest and James Roby's last-minute break added a gloss to the final scoreline.
Both teams finished with 12 men after Wigan's former New Zealand international Frank Paul Nuuausala, on his home debut, and St Helens forward Louie McCarthy-Scarsbrook were sin-binned for their part in an ugly free-for-all in front of a First Utility Super League season's-best crowd of 20,049.
St Helens coach Keiron Cunningham put his side's emphatic derby win down to the new-found self-belief running through his players.
Saints demonstrated superb defensive mettle to end the regular season on a high with a fifth straight victory that keeps alive their play-off semi-final hopes.
"I'm just pleased for my players, they stood up to everything Wigan threw at us," Cunningham said. "They could probably still be playing now and not score.
"That's what self-belief brings to a side. We went through a tough spell but we're a real close-knit group and now we're heading in the right direction.
“Wigan are a great attacking side and were fully stacked tonight. They had lots of threats but I thought we stuck to the plan.
"We weren't great with the ball and we didn't kick the ball well enough but playing against a top-two side you don't get as much time as you do against other sides.
"I'm pleased we kept them to one try.
A massive thank you to all the fans that came out to cheer the boys today! pic.twitter.com/VfOeB9GAND— St.Helens R.F.C. (@Saints1890) July 22, 2016
"We're not going to fall in love with ourselves, we give ourselves a good shot for the top four."
Shaun Wane's men had hopes of going into the Super 8s in top spot but that privilege goes to Hull following their 28-20 win at Salford and the Warriors could now finish the regular season in third place.
Wane conceded his team will need to improve markedly on their lacklustre performance in attack when they take on Hull in the Ladbrokes Challenge Cup semi-finals next weekend.
"I'm gutted, devastated," he said. "We didn't turn up and got what we deserved. The smartest team won. They were good on the floor and were allowed to be good.
"They were the best team and they defended their line really well.
"I thought we had some poor calls but they wanted it more.
"Our defence was very good for large parts of the game but our attack was off. Too many individual players had a poor game.
"We've got seven hard days of work ahead of us now. We need to make sure we turn up against Hull with the same commitment to defence but we've got to be better on attack."