Dundee ensured they will play in the William Hill Premiership again next season after beating relegated St Johnstone 2-0 at McDiarmid Park this afternoon.
Lyall Cameron scored both goals for Tony Docherty's side - the second from the penalty spot in stoppage time - as the Dark Blues finished in 10th place.
Ross County will now face Livingston in the play-off final over two legs on Thursday May 22 and Monday May 26 following their 1-1 draw with Motherwell in Dingwall.
Stephen Kingsley scored a last-minute winner as Heart of Midlothian - who had Yan Dhanda sent off in 38 minutes - beat Kilmarnock 1-0 at Rugby Park.