Hamilton Accies will face Dundee United in the play-off final after beating Dundee 4-0 at the SuperSeal Stadium on Saturday.
Rakish Bingham, Giannis Skondras, Dougie Imrie (penalty) and Ali Crawford were all on target as they finished in 11th place.
Martin Canning's men now travel to Tannadice on Thursday night with the second leg in Hamilton on Sunday May 28, both live on BT Sport.
Inverness CT were relegated despite beating Motherwell 3-2 at the Tulloch Caledonian Stadium. Greg Tansey and Alex Fisher (2) netted for Richie Foran's men before James McFadden and Ryan Bowman (penalty) reduced the deficit.
Ross County sealed seventh spot as they came from behind to beat Kilmarnock 2-1 at Rugby Park. Conor Sammon gave Killie the lead with an early penalty but Premiership top scorer Liam Boyce bagged a double for the Staggies.