Salford Red Devils snapped a three-game losing run to beat Castleford Tigers 22-18 and keep their hopes of a top-eight Super League finish alive.
The Tigers needed a win to guarantee a spot in the Super League play-offs, but Gareth O'Brien's boot was the difference for Salford.
The Red Devils could be further boosted as an appeal against their six-point deduction for breaching salary-cap rules is heard, and they will hope to make up further ground on the top eight.
A pair of Jake Webster tries had Castleford 12-10 to the good at the break at the AJ Bell Stadium, with Luke Dorn's score extending that cushion to eight points in the second half.
However, Mason Caton-Brown touched down with 20 minutes to play and O'Brien kicked three penalty goals to turn the tie on its head.
Hull KR failed to grab the win they wanted to keep their top-eight chances alive, although a 16-16 draw against Warrington Wolves does not entirely rule them out.
Ian Thornley's try with two minutes to play at the KC Lightstream Stadium gives the hosts a glimmer of hope, but they are more likely to be fighting for survival when the league splits in three weeks' time.