Wakefield Trinity Wildcats pulled off the great escape with a dramatic 29-17 win to condemn neighbours Castleford Tigers to relegation for the second time in three years.
The Wildcats were 1-8 odds-on favourites with the bookmakers to go down when John Kear took over the reins two months ago, but a heart-stopping win in a match worth �1million to the victors was their fourth in six matches as they reached the target set by the coach with the midas touch.
The eagerly-awaited clash, played in front of 11,000 fans shoe-horned into Belle Vue and others perched on rooftops overlooking the famous ground, lived up to all expectations.
It was every bit as close as expected, with Wakefield just about deserving their success after holding their nerve and ending Castleford�s brave resistance with two tries in the last 15 minutes.
It was a sad way for Castleford captain Danny Nutley to bow out of the English game, while assistant coach Brad Davis found himself on the losing side on a last-day decider for the second time.
The Tigers were the pre-season relegation favourites but they went into the biggest game in their recent history game needing a single point to secure their future - and for long periods they looked capable of achieving it.
Jamie Rooney kicked the home side into an early lead after Castleford forward Richard Fletcher had been penalised for a high tackle on Wakefield scrum-half Ben Jeffries.
But it was the visitors who scored the first try of an action-packed first half, with second-rower Willie Manu pouncing on a Danny Brough grubber kick after defender David Solomona had been slow to react.
Brough made it 6-2 with the conversion but Jeffries then saw a try disallowed by video referee Ian Ollerton for obstruction in back play after slipping Danny Ward�s challenge and breaking 70 metres to cross.
Wakefield were spared further punishment, though, when Brough missed his kick at goal from the resultant penalty.
However, five minutes later, Tigers full-back Michael Platt cut a swathe through the heart of the home side�s defence and, although he was eventually stopped, defenders were still retreating when winger Adam Fletcher went from acting half and sprinted 30 metres to the corner for a second Castleford try.
Brough was again wide with the goal attempt but increased his side�s lead to 11-2 with a drop goal before Wakefield struck back with two tries in the last 10 minutes of the half, despite the loss of full-back Colum Halpenny with concussion.
An offload by substitute forward Ben Catic was hacked sideways by Monty Betham straight into the hands of centre James Evans, who was left with an unopposed run to the line.
Rooney added the goal and almost grabbed a try following another neat offload from Catic, but the pass went to ground.
Wakefield kept up the pressure, however, and regained the lead three minutes before the break when club captain Jason Demetriou demonstrated remarkable strength and fortitude to brush off a series of attempted tackles and reach the line.
Rooney maintained his 100 per cent record with the boot to give his side a three-point lead but it was anybody�s game.
There were more signs of nerves at the start of the second half, with Wakefield�s Semi Tadulala and Castleford�s Deon Bird both fumbling the ball on the first tackle.
But there was no let-up in the action as the lead changed hands twice more within 11 minutes of the re-start.
First, Nutley took a pass from dummy-half Andy Henderson to crash over for only his third try for the club in his final match.
Brough�s goal made it 17-14, but Wakefield quickly made their way upfield and their captain Betham took Sam Obst�s pass to bounce off the tackle of Luke Dyer and touch down.
Rooney�s fourth goal restored the Wildcats� three-point lead as the game entered a dramatic final quarter.
Castleford sent on 38-year-old Davis in one last bid for glory and winger Ryan McGoldrick reached the line only to be held up on his back.
That proved to be the Tigers� last chance as the Wildcats took full advantage of a knock-on by Gray Viane to set up the all-important score, centre Kevin Henderson taking Solomona�s pass to cross at the corner.
Rooney was off target for the first time but Trinity had a seven-point cushion, which became eight when Rooney coolly slotted over a drop goal.
And the Wildcats piled on the misery for their neighbours when Evans grabbed his second try after Rooney�s high kick deceived Dyer with a wicked bounce.
Wakefield (14) 29. Tries: Evans 2, Demetriou, Betham, Henderson. Goals: Rooney 4. Drop Goals: Rooney.
Castleford (11) 17. Tries: Manu, A. Fletcher, Nutley. Goals: Brough 2. Drop Goals: Brough.
Wakefield: Halpenny, Demetriou, Evans, Henderson, Tadulala, Rooney, Jeffries, Watene, Obst, Korkidas, Solomona, MacGillivray, Betham. Replacements: March, Elima, Catic, Latu.
Castleford: Platt, A. Fletcher, Shenton, McGoldrick, Dyer, Lupton, Brough, Sculthorpe, Henderson, Nutley, Ward, Manu, R. Fletcher. Replacements: Bird, Fa�aoso, Viane, Davis.
Referee: R Silverwood (Dewsbury)