Match ends, Hamilton Academical 0, Kilmarnock 2.
Kilmarnock's Scottish Premiership survival now rests on a play-off against Dundee despite a comfortable final-day victory at Hamilton Academical confirming their hosts' inevitable relegation.
The Ayrshire side looked to be heading for safety at half-time after Mitch Pinnock's first-half double and with Motherwell leading Ross County.
But the Dingwall side turned things around to win, having only needed a point to survive, rendering Kilmarnock's victory meaningless.
- Should Kilmarnock be bullish about play-off?
- Podcast: Kilmarnock face relegation sweat
- Reaction & as it happened
Tommy Wright's side now face Dundee - who beat Raith Rovers 3-1 on aggregate - over two legs in a bid to earn a 29th consecutive year in Scotland's top division. The first match is at Dens Park on Thursday.
Brian Rice's Hamilton needed to win by nine goals to avoid bottom spot and preserve their seven-year stay in the top flight, which never seemed possible.
Kilmarnock's fate was out of their hands after County managed back-to-back wins in the lead up to the final game, and despite the Dingwall side trailing at half-time, they found the required response.
The Ayrshire side held up their end of things by coasting into a comfortable lead, with Pinnock evading his marker to tap home on nine minutes after a superb delivery by Ross Millen.
The Englishman then showed good composure to roll in his second and finish off a rapid counter attack, after a clever pass from Alan Power.
His afternoon was blemished by a missed penalty, though, as Hamilton's 19-year-old goalkeeper Jamie Smith made a fine save on his debut after Kyle Lafferty was brought down midway through the second period.
And as news began to filter through from Fir Park that County had levelled and then taken the lead, Kilmarnock's impetus tailed off.
Hamilton were effectively sure of their relegation, and that was reflected in Rice's team selection as he put out a youthful side.
They were second best for most of the game, and Aaron Martin's clumsy touch and subsequent foul on Lafferty for the penalty summed up their afternoon.
Man of the match - Mitch Pinnock
What did we learn?
Kilmarnock held up their end of the bargain as expected, but they will rue certain moments since the split.
They have only lost one of their final five games, but the fact they didn't really turn up in that match against Motherwell will be a source of immense frustration, as will the draws with County and St Mirren, particularly as they were twice in front against both.
Despite a problem in goal and arguably at left-back, they have a fairly settled side and will likely fancy their chances over two legs against Dundee, particularly going forward. They have not sunk like a stone to this position, and arguably look a better and more confident side than the table suggests.
As for Hamilton, they have defied all the odds to remain in the Premiership for seven seasons. Their successful youth academy is the cornerstone of the club, and Rice - who has just signed a new deal - will look to that again as they attempt to rebuild in the second tier.
Smith's fine save on debut epitomised that, and he was one of seven academy products on show against Kilmarnock. Whether there is enough depth to bounce straight back, though, is another matter.
What they said
Hamilton head coach Brian Rice: "We saw signs today of what these young kids have got and why they're playing in the Premiership at the age they are. Hopefully that's the foundations that we've got for next season."
Kilmarnock manager Tommy Wright: "For Ross County to get three wins on the bounce at this stage of the season, you've got to hand it to them. I can't ask any more from my players.
"When I came in I thought 36 points would have been enough. Unfortunately, it isn't."
Kilmarnock face Dundee at Dens Park in the first leg of the Premiership play-off on Thursday (20:15 BST), followed by the second leg the following Monday. It's holiday time for Hamilton.
- 16MartinBooked at 72mins
- 11SmithSubstituted forMoyoat 66'minutes
- 4StirlingSubstituted forStangerat 53'minutes
- 18MimnaughSubstituted forRedfernat 67'minutes
- 21MunroSubstituted forThomasat 58'minutes
- 7AndersonSubstituted forSmithat 58'minutes
- 3HaunstrupBooked at 47mins
- 6PowerBooked at 90mins
- 8DickerBooked at 35minsSubstituted forMulumbuat 89'minutes
- 29BurkeSubstituted forMcKenzieat 67'minutes
- 10KiltieBooked at 57minsSubstituted forTshibolaat 75'minutes
- 28LaffertySubstituted forOakleyat 75'minutes
- Kevin Clancy
- Shots on Target
Second Half ends, Hamilton Academical 0, Kilmarnock 2.
Corner, Hamilton Academical. Conceded by Brandon Haunstrup.
Alan Power (Kilmarnock) is shown the yellow card.
Jamie Hamilton (Hamilton Academical) wins a free kick in the defensive half.
Foul by George Oakley (Kilmarnock).
Attempt missed. Nathan Thomas (Hamilton Academical) left footed shot from the right side of the box is too high. Assisted by Callum Smith.
Foul by Jamie Hamilton (Hamilton Academical).
George Oakley (Kilmarnock) wins a free kick in the defensive half.
Substitution, Kilmarnock. Youssouf Mulumbu replaces Gary Dicker.
Attempt missed. David Moyo (Hamilton Academical) left footed shot from the centre of the box is too high.
Corner, Hamilton Academical. Conceded by Colin Doyle.
Corner, Hamilton Academical. Conceded by Mitchell Pinnock.
Attempt blocked. Nathan Thomas (Hamilton Academical) left footed shot from the right side of the box is blocked. Assisted by David Moyo.
Foul by Marley Redfern (Hamilton Academical).
Aaron Tshibola (Kilmarnock) wins a free kick in the attacking half.
Callum Smith (Hamilton Academical) wins a free kick in the defensive half.
Foul by Aaron Tshibola (Kilmarnock).
Corner, Kilmarnock. Conceded by Aaron Martin.
Corner, Kilmarnock. Conceded by Hakeem Odoffin.