Betfred Super League
Leigh (12) 20
Tries: Briscoe, Charnley, Hughes Goals: Reynolds 3 Drop-goals: O'Brien 2
Wakefield (6) 19
Tries: Hood, Kershaw 2 Goals: Lino 3 Drop-goal: Gale
Wakefield have been relegated from Super League after falling to a dramatic defeat at Leigh Leopards.
Tries from Tom Briscoe and Josh Charnley, either side of Liam Hood's reply for the visitors, gave the home side a 12-6 half-time advantage.
Jack Hughes' try after the restart extended their lead but a quickfire double from Lee Kershaw levelled it up.
The teams exchanged drop-goals to send it to golden-point extra time and Gareth O'Brien kicked the winner.
It was ultimately a cruel way for Trinity's 24-year spell in the top tier to come to an end, and they will be left to rue missed drop-goal attempts of their own that would have sent their battle for survival to the final weekend.
Local rivals Castleford fell to a thumping 48-6 loss at in-form Wigan but it mattered not in the end thanks to O'Brien's successful kick with extra time almost up.
Trinity remain four points behind Cas at the foot of the table with just the final game of the campaign to come against Hull KR next Friday.
Wakefield got off to a disastrous start when they fell behind after just four minutes when Briscoe made the most of lax defending but Hood quickly got the away side back on terms.
Charnley continued his excellent season with his 26th try of the year, moving him one clear of Catalans' Tom Johnstone at the top of the standings.
Hughes' score, when Wakefield were down to 12 men with Kevin Proctor in the sin bin, could have broken the strugglers' resolve but they showed great character to fightback thanks to two Kershaw tries in six minutes.
Ben Reynolds and Mason Lino exchanged penalties to keep the scores tied before O'Brien looked to win it and doom the Yorkshire side with his first drop-goal of the night.
However, Luke Gale landed a kick of his own in the last minute to send the game to golden-point extra time.
Both sides managed to get into good field position and Max Jowitt saw a kick fall just underneath the posts for Mark Applegarth's desperate visitors before O'Brien came up trumps to break Wakefield hearts.
Leigh, who won the Challenge Cup for the third time earlier this year, are up to fourth and have guaranteed a play-off spot in what has been a superb first season back in Super League.
For Wakefield, the second tier beckons for the first time since 1998.
Wakefield head coach Mark Applegarth told BBC Radio Leeds:
"I don't think I can sum up my emotions. I'm hurt if I'm honest.
"It's my responsibility and I feel that on my shoulders. It's a bit raw at the moment.
"It's not effort I'm questioning. I couldn't ask for more from them.
"We could have taken a drop-goal attempt a little earlier but you could look at a load of little things in the game. It's not one individual's fault why we have lost that game.
"The table doesn't lie and we've not been good enough all year. We've got some tough decisions to make but one thing I will guarantee is that Wakefield Trinity will be back."
Leigh: O'Brien, Briscoe, Gildart, Chamberlain, Charnley, Reynolds, Lam, Amone, Ipape, Mulhern, Hughes, O'Donnell, Davis.
Interchanges: Mellor, Wardle, Nakubuwai, Holmes.
Wakefield: Jowitt, Kershaw, Croft, Franco, Lineham, Gale, Lino, Battye, Hood, Whitbread, Ashurst, Griffin, Pitts.
Interchanges: Tanginoa, Kay, Proctor, Salabio.
Referee: Tom Grant.