Kris Doolan was the hero for Partick Thistle as they beat Dundee 1-0 at Dens Park to avoid automatic relegation from the Ladbrokes Premiership.
Doolan struck after 63 minutes to send the Jags into the play-off final against Livingston on Thursday May 17 and Sunday May 20, with the first leg at the Tony Macaroni Arena.
That result meant Ross County were relegated after six seasons in the top flight. Craig Curran gave the Staggies a third-minute lead at McDiarmid Park but David Wotherspoon's injury-time goal earned St Johnstone a 1-1 draw.
In the day's other Premiership game, Nadir Ciftci scored twice as Motherwell beat Hamilton Accies 3-0 in the Lanarkshire derby at Fir Park.