St Helens finally discovered a way to beat Wigan and in doing so managed to avoid them in the first round of the Super League play-offs.
Had Mike Rush's men suffered a fourth derby defeat of 2012, they would have been forced into a return visit to the DW Stadium in next Friday's qualifying play-off.
Instead, a 26-18 victory in last night's final match of the regular season helped them secure third place for the second consecutive year and a trip to second-placed Warrington next Saturday.
"We'll go there with confidence but also the knowledge that we're playing another very good team," said Rush, whose team are the only visitors to win at the Halliwell Jones Stadium this season.
As well as Saints played in front of a bumper crowd of 21,522, last night's match hinged on the 16th-minute dismissal of Wigan hooker Michael McIlorum for a high and late tackle on Anthony Laffranchi.
The Warriors, who were presented with the league leaders' shield after the match, battled valiantly but were ultimately no match for the ball-handling skills of St Helens forward Tony Puletua, whose crafty offloads helped create three of their four tries.
"We gave ourselves too much to do, losing Micky Mac so soon," Wigan coach Shaun Wane said. "You can't do that against good teams like St Helens.
"The best team won in the end. There were a lot of real positives. We were a bit dumb at times but for their effort I can't thank them enough."
The hosts had led 6-0 thanks to Thomas Leuluai's 12th-minute try but Saints took advantage of the dismissal of McIlorum to run in tries through James Roby and Tom Makinson to establish a 12-6 interval lead.
Wigan drew level thanks to Pat Richards' try early in the second half but Saints got their second wind and clinched their first derby win of the season thanks to further tries from Andrew Dixon, Josh Jones and Jonny Lomax.
St Helens have now finished in the top three in each of the last eight years and remain on course for a seventh consecutive Grand Final.
"It shows what a consistent strong club we are but the players still want silverware at the end of it," Rush added.
Wigan's first-round opponents will be either Catalan Dragons or Leeds but they could be forced to start their play-off campaign without McIlorum.
The Rugby Football League's match-review panel will decide on Monday whether or not to charge the England international, but Wane has already signalled that he will fight any threat to impose a ban.
"It would be tough to lose him because he's been one of our best players this year," he said.