Ayr United secured their second-tier status thanks to a 3-1 victory over Partick Thistle at Somerset Park, helped by a pair of Aaron Muirhead penalties.
The Jags still make the promotion play-offs and will face Inverness Caledonian Thistle, who signed off with a 4-0 home win against Hamilton Accies.
Dunfermline Athletic are facing a relegation play-off against Queen's Park following a 2-1 home defeat to already-relegated Queen of the South.
Runners-up Arbroath go into the play-offs on the back of a 3-0 victory over Morton at Gayfield while champions Kilmarnock concluded their campaign with a 1-1 draw against Raith Rovers at Stark's Park.