Queen of the South beat third-placed Inverness CT 2-1 at Palmerston in the cinch Championship on Tuesday evening to keep alive their slim hopes of avoiding relegation.
Josh Todd's early goal was cancelled out by Logan Chalmers but Euan East scored a 40th-minute winner for Willie Gibson's side.
Queen of the South are now six points adrift of both Ayr United and Dunfermline Athletic, who they face in their final two matches.