ROSS County came out on top and reclaimed the Scottish Premiership 'best of the rest' post-split seventh slot after a five-goal thriller in Dingwall.
An injury time goal from Jonathan Franks sealed all three points for the Staggies against Hamilton Accies who put up a stout battle in their bid to avoid the play-off place.
Had Hamilton prevailed, basement battlers Inverness Caledonian Thistle would have faced the drop tonight.
They were counting on their fierce Highland rivals to do them a favour and County duly obliged in a frenetic encounter watched, thanks to a generous free ticket offer by the Dingwall club, by a bumper 4871-strong crowd.
County got off to the best possible start when Michael Gardyne fired up the home crowd with a scorcher from distance after just three minutes.
Rakish Bingham levelled it up before County went back in front when a Jim O'Brien effort went in off Remi Matthews.
Substitute David Templeton seemed to have snatched a precious point for Accies before Franks broke Hamilton hearts with his late winner
County leapfrog Kilmarnock, who can only reclaim the seventh spot by beating the Staggies at home in he clubs' final match of the season on Saturday.
Motherwell secured their top flight safety with a win over Kilmarnock.
The night's results mean Accies can no longer get higher than the eleventh play-off space - and could still be caught by Inverness Caledonian Thistle. ICT face Dundee away in a must-win match tomorrow before a final day showdown at home against Motherwell.
Full match report and reaction in Friday's Ross-shire Journal.