Wakefield went down fighting at Leigh Sports Village as Gareth O'Brien's dramatic golden point drop goal signalled a heart-breaking end to their 24-year-stay in the Super League.
Luke Gale's kick with 19 seconds left of normal time had forced the extra period and given the visitors hope of extending their survival mission into the final week of the season.
But after both Gale and Max Jowitt missed chances to win it for Wakefield, O'Brien stepped up to seal a 20-19 victory that is also enough to confirm Leigh's place in the play-offs in their first season back in the top flight.
- Super League standings | Upcoming Super League fixtures
- Stream the Super League, NRL and more with NOW
It was a shattering way to finish for Mark Applegarth's team, who had given themselves hope after two second-half tries from Lee Kershaw hauled them back level.
But ultimately despite a stirring fightback in the second part of the season, their 14 successive losses at the start of the campaign proved too much to recover and Wakefield must now face up to life in the Championship next term.
Hopes of piling the pressure onto rivals Castleford going into the final week seemed slim when Tom Briscoe surged over in the corner with just four minutes on the clock, O'Brien's first of two successful conversions extending Leigh's lead.
But Adrian Lam's side still looked a little sluggish, and five minutes later a sloppy pass from Tom Amone to Kai O'Donnell was intercepted by Liam Hood who charged 40 metres to ground under the post, leaving Mason Lino the simplest opportunity to haul his side level.
Josh Charnley shot over in the corner as Leigh swiftly restored their advantage and Wakefield looked down and out three minutes after the restart when Jack Hughes barged over to extend Leigh's advantage to 16-6.
But two errors from the hosts handed Wakefield their improbable lifeline. First a fumble by Ben Nakubuwai allowed Kershaw to surge 60 metres and reduce the deficit, then Josh Griffin charged down O'Brien's kick on halfway and from the next play a series of crisp passes sent Kershaw dipping over in the corner.
An exchange of penalties kept the score level, before O'Brien's drop goal with four minutes left on the clock appeared to have clinched victory for the hosts.
Instead Wakefield were handed one final opportunity and Gale's long-range kick with less than half a minute on the clock forced the extra period and gave them hope of going into next week's home game against Hull KR with the season still alive.
Gale and Lachlan Lam both missed over-ambitious efforts in a frantic first period of added time but the best chance fell to Jowitt, who scuffed his effort from 20 metres.
Instead the play swung to the other end and after making good yardage, Leigh flashed the ball back to O'Brien who never looked likely to miss the chance to extend his own side's campaign.
Warrington Wolves 6-18 St Helens
St Helens maintained their push for the 2023 League Leaders' Shield with a hard-earned 18-6 victory over Warrington Wolves at the Halliwell Jones Stadium.
The Saints made it seven wins on the bounce, and registered their third victory over the Wolves this season, to set up a final-day showdown with Wigan and Catalans Dragons to see who will finish in the top two and secure a home semi-final.
Mark Percival claimed a personal tally of 10 points with a try and three goals with Curtis Sironen and Moses Mbye also touching down for the champions.
Daryl Clark, on his final home appearance for the Wolves, claimed his side's try against his new employers in 2024, which Stefan Ratchford converted.
Clark captained the Wolves on his farewell home appearance while there was a home debut for half back Leon Hayes in the absence of key half back George Williams. Matty Russell, Connor Wrench and Joe Philbin also came into the side.
St Helens made just one change from the side that defeated Leigh as they welcomed back Sironen in the pack after injury in place of George Delaney.
St Helens dominated the opening 40 minutes and the Wolves would have been relieved to only go in trailing 12-0 at half-time.
After bossing the opening exchanges the Saints finally made plenty of territory and possession tell after 12 minutes when Jonny Lomax sent Sironen crashing over from close range and Percival converted.
The champions continued to apply all the pressure and it was no surprise when they extended their lead, with Percival claiming his side's second try which he again converted.
The Wolves did finally apply some pressure to the Saints line deep in the half but when they did create an opportunity Jack Welsby produced a superb try-saving tackle to deny Matty Russell as he bundled the Wolves winger into touch.
The start of the second half continued in a similar vein with St Helens looking the more dangerous side after the restart but the Wolves were hanging on with some stubborn defensive efforts.
When the Wolves did threaten the Saints came up with more superb try-saving heroics to deny Danny Walker and Matty Ashton.
The Saints' dam finally broke after 56 minutes when Clark managed to sneak over from dummy half close to the line and Ratchford converted to cut the lead to six points at 12-6.
It prompted Warrington's best spell of the game as they applied plenty of pressure but they could not add to their tally even when the visitors had to play the final three minutes a man down after Jon Bennison was sent to the sin bin for obstruction.
In the final seconds of the game Mybe touched down as the hooter sounded and Percival converted to complete the victory.
Wigan Warriors 48-6 Castleford Tigers
Abbas Miski scored five of Wigan's 10 tries as they moved a step closer to winning the League Leaders' Shield with a convincing 48-6 win over Castleford.
The game was never really a contest and it could have been a wider margin had the Warriors kicked the majority of their goals.
Wigan led 22-6 at the break with Miski scoring four tries and Jake Wardle grabbing one, while Harry Smith managed just one conversion from five attempts.
Two quick tries at the start of the second half from Sam Powell and Kai Pearce-Paul saw Wigan lead by 26 points and they were not finished there.
Jai Field got on the scoresheet while Castleford were down to 12 players with Blake Austin in the sin-bin, while Bevan French finally got a try his performance deserved after having a hand in a few others.
Jack Broadbent almost gave the Tigers a dream start as he broke down the right following a missed tackle from Wardle, but Field was on hand to stop him scoring.
Wigan made Castleford pay with two tries in four minutes with Miski scoring them both. The first one saw Smith, French and Toby King combining to send the Lebanon international in at the corner. Smith converted for a 6-0 lead.
Miski grabbed his second on Wigan's next attack as French tormented the Tigers defence before sending a kick to the corner for the winger to collect and score for a 10-0 advantage.
A huge hit from Junior Nsemba on Sam Hall saw the ball come free and Wigan launched another attack. They made no mistake in extending their lead as they went left and a cut-out from Field looked to have put Liam Marshall in at the corner, he was heading to the sideline and threw a beautiful pass back inside for Wardle to crash over. Smith was off target but Wigan led 14-0.
The Tigers gave themselves a fighting chance as they capitalised on a Wigan error with a nice scrum move that saw Jason Qareqare go over in the corner. Austin converted and they only trailed by eight.
Castleford lifted in confidence from that try and made the Warriors work hard in defence without creating too much, although a little kick-through looked to have opened up the Warriors but Patrick Mago was on hand to put his body on the line and come to his team's rescue.
Wigan shrugged off a tame period with the ball and crossed for their fourth try of the half with Miski completing a first-half hat-trick following another flowing passing move.
Miski ended the half with his fourth try in similar fashion to his first and third.
Ryan Hampshire was introduced into the action at the start of the second half in place of Smith and his first job was to convert a goal after Powell crashed over under the posts after a great break and offload from Mago.
It was too easy for Wigan as they crossed for their seventh try as French caused more chaos before sending Pearce-Paul over to score.
The Tigers had a few sets in Wigan's half without creating much before they seemed to lose their heads. First they conceded a penalty for dissent before Austin was sent to the bin for a dangerous tackle.
The Warriors made that extra man count with Field showing some silky footwork to cross. Hampshire converted for a 38-6 lead.
It could have been a lot worse for the Tigers with Field dropping the ball over the line, while Nsemba, Miski and Mago all went close to adding to the score-line.
French capped off a fine performance with a try from distance as he ran opposed from halfway to touch down under the posts, before Miski finished where he started with a simple effort in the corner to take his season's tally to 27 and take over as the leading try-scorer.