Kilmarnock will play Dundee in the play-off final despite a 2-0 win at Hamilton which officially relegated Accies from the Scottish Premiership.
A first-half double from Mitch Pinnock gave the visitors a last-day victory although he passed up on the chance of a hat-trick when debutant Hamilton goalkeeper Jamie Smith saved his second-half penalty.
Ross County needed just a point at Motherwell to ensure safety and emerged with 2-1 win.
Accies’ relegation was confirmed after the nine goal win they needed to leapfrog the Rugby Park side unsurprisingly failed to materialise.
After seven years in the top flight, boss Brian Rice will reset in the summer and go again.
Kilmarnock, though, still have their future in their own hands and Tommy Wright’s team, who finished in 11th place, will travel to Dens Park on Thursday with the second leg at Rugby Park on the following Monday.
Accies’ fate was effectively sealed with the 2-1 defeat at Ross County on Wednesday night.
Rice made five changes, handing starts to Ben Stirling, Kyle Munro, Ronan Hughes, Lewis Smith and 19-year-old keeper Jamie Smith – one of seven academy players starting.
Kilmarnock changed their keeper too with Colin Doyle replacing Danny Rogers while Brandon Haunstrup replaced left-back Calum Waters.
Amid an enthusiastic start by eager Hamilton, the Ayrshire side opened their scoring after nine minutes with their first real attempt on goal.
Defender Ross Millen swung a tantalising cross in from the right and Pinnock got in front of Stirling to knock the ball in from around six yards.
The home side were undeterred. The lively Lewis Smith was causing problems for Kilmarnock in attack and had one goal-bound shot blocked by Killie centre-back Zeno Ibsen Rossi.
The match, however, was being mostly played between the two penalty areas, although a powerful Pinnock shot from the edge of the box in the 39th minute was deflected behind by Hamilton defender Aaron Martin for a corner which was repelled.
However, Pinnock had more luck a minute before the break on a swift counter-attack when midfielder Alan Power sent him running clear and the former AFC Wimbledon midfielder slotted his shot low past Smith.
Hamilton pressed with added purpose at the start of the second half but still Doyle was not unduly troubled.
Pinnock, sensing a hat-trick, fired a long-range effort wide while a much better effort from inside the box minutes later was blocked by Hamilton substitute George Stanger.
Pinnock then had a gilt-edged chance from the spot after Martin brought down Kyle Lafferty having been caught in possession but Smith dived to his left to beat away the spot-kick.
Substitutes continued to pile on and Killie keeper Doyle tipped a curling shot from Nathan Thomas over the crossbar and fellow replacement David Moyo lofted a shot over the bar before Thomas did likewise.
But the visitors held out and now need to take a deep breath and prepare for the double-header against Dundee.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country