Hibernian have given themselves the easiest path through the playoffs, beating Falkirk to make sure that they finished second ahead of Rangers in the Scottish Championship.
Martin Boyle put the visitors ahead just five minutes in before a Jason Cummings goal doubled their advantage just before the break, and Dominique Malonga sealed it late on.
A late goal from Kyle Jacobs from the penalty spot ensured that Livingston will remain in the second tier next season as they beat playoff-bound Queen of the South.
Lewis Kidd brought Daniel Mullen down in the box late on, allowing Jacobs to secure all three points with the spot kick.
Alloa Athletic condemned Cowdenbeath to bottom place and relegation with a win that gives them a chance to secure their place in the division in the relegation playoff.
Michael Chopra opened the scoring early on before a John Armstrong own goal and Liam Buchanan strike sealed the win.
Dumbarton needed a late goal to secure a draw with Raith Rovers, leaving both sides to finish midtable.
Jordan Kirkpatrick put the home side ahead before the break, but two goals in the second half put Raith in front before Scott Agnew ensured that the sides finished level.
Elsewhere, champions Hearts finished their campaign with a 2-2 draw with Rangers, scoring twice in the final 10 minutes to come from behind.
Results in full: Alloa 3-0 Cowdenbeath, Dumbarton 2-2 Raith Rovers, Falkirk 0-3 Hibernian, Hearts 2-2 Rangers, Livingston 1-0 Queen of the South