Castleford have been relegated for the first time in their 78-year history after losing 28-32 to Wakefield.
Castleford 28 (18)
Tries: Saxton, Mellor 2, Godwin, Gibson, Smith
Goals Maloney 2
Wakefield 32 (18)
Tries: Tadulala, Halpenny 2, Solomona 2, Handforth
Goals: March 2, Solomona, Handforth
Hull's 20-18 win over Widnes, the only other team in danger of the drop, gave the Tigers - bottom all season - a chance to pull off the great escape.
Castleford led 18-10 in the first half but Wakefield were in no mood to roll over for their local rivals.
Their only hope is that the winners of October's National League Grand Final fail to meet the promotion criteria.
The Tigers put on a brave show in front of a near-capacity 11,055 crowd at the Jungle, and had won five of their last 10 matches.
But in the end were made to pay a heavy price for a woeful start to the season in which they lost their opening 11 games.
They made the worst possible start by conceding a try after just two minutes but, in a fast and furious opening 40 minutes.
But the hosts hit back to open up an 18-10 lead only to concede a try in the last minute of the half that tied the scores at the break.
The Tigers made a mockery of their perilous position to produce some carefree rugby and took the lead with two tries in three minutes through Damian Gibson and Tom Saxton.
But Wayne Godwin failed with both conversion attempts and the misses began to look costly as the Wildcats regained the lead through Colum Halpenny.
The home side struck back with two further tries in four minutes through Paul Mellor and Michael Smith as the game swung from end to end.
Castleford suffered a blowm, however, when they lost inspirational playmaker Brad Davis failed to appear for the second half.
The game turned in four minutes either side of half-time when Wakefield's David Solomona powered over two close-range tries and then broke away for Paul Handforth to touch down.
Mellor went over for his second try on 57 minutes, the game was slipping beyond the home side.
Halpenny superbly picked up skipper Gareth Ellis' pass by his boot laces to score his second try and seal Castleford's fate, although they never gave up the
Castleford: Gibson, Pryce, Mellor, Saxton, Rogers, Davis,
Maloney, Greenhill, Godwin, Lynch, Harland, M. Smith, Hudson.
Replacements: Tookey, Sykes, Hepworth, Jackson.
Wakefield: M. Field, Halpenny, Demetriou, Domic, Tadulala,
Ellis, Jeffries, Feather, March, Korkidas, Solomona,
Replacements: Griffin, Handforth, Elima, Ryder.
Referee: Ian Smith (Oldham)