Dundee secured their William Hill Premiership status with a 2-0 win at relegated St Johnstone to consign Ross County to another play-off.
With a two-point cushion on the Staggies heading into the final game of the season, Dundee’s fate was in their own hands at McDiarmid Park.
Lyall Cameron, on his final appearance for the club before joining Rangers, gave the visitors a 28th-minute lead.
The Dark Blues were awarded a penalty in stoppage time after a foul on Ziyad Larkeche, and Cameron made no mistake to secure 10th place for Tony Docherty’s side.
Ross County drew 1-1 with Motherwell in Dingwall, which meant they would head into a relegation play-off for the third year in a row.
Ronan Hale had given the Staggies hope when he fired in his 16th goal of the season in the 29th minute, but Motherwell equalised three minutes from time through Moses Ebiye’s header.
County will take on Livingston over the two-legged relegation play-off.
Read more: Hibs Women denied Sunshine on Leith moment but set to party into the night
Lawrence Shankland opens up on Hearts future with contract talks expected
Stephen Kingsley’s late goal gave 10-man Hearts a 1-0 win at Kilmarnock – where Derek McInnes was conspicuous by his absence from the home dugout.
With McInnes looking set to take up the vacant managerial position at Tynecastle, Killie under-18s head coach Chris Burke was overseeing the side alongside first-team technical coach Craig Clark.
The Jambos were reduced to 10 men in the 38th minute when forward Yan Dhanda was shown a straight red card following a VAR review after his late challenge on Stuart Findlay.
Just when it seemed the sides would be settling for a point, Kingsley slotted home a loose ball in the 89th minute.