Ross County "know what it takes" to get through a Scottish Premiership play-off, insists interim manager Don Cowie, after a draw with Aberdeen consigned them to 11th place for the second year running.
County needed to win, or hope St Johnstone couldn't, to guarantee safety.
But despite Simon Murray's inventive opener and Yan Dhanda's penalty equaliser, goals by Ester Sokler and Jamie McGrath were enough to earn Aberdeen a draw.
Even after the visitors were reduced to 10 men after Angus MacDonald was sent off for conceded the spot kick, County were unable to find the winner.
Will Nightingale twice had efforts off the frame of the Aberdeen goal but Cowie's side could not trump St Johnstone's victory at Motherwell.
Instead, they wil travel to face Raith Rovers in the first leg of the play-off final on Thursday, the Championship runners up having beaten Partick Thistle on penalties.
"We've got to be ready for two very important games," said Cowie, who's side bested Thistle in last season's play-off final.
"Raith are a very good team and are going to be feeling good about themselves.
"We're going to have to be at our best. We know what it takes but it's going to be a real challenge."
Aberdeen finish as 'best of the rest' in seventh place, having gone unbeaten since the league's split.
Their final points tally of 48 is higher than St Mirren, who are fifth, and sixth-placed Dundee.
Yet it could have been better, given they led this game.
Connor Barron's mazy run and chipped cross was nodded in by the leaping Sokler to level, before Hoilett got the break of the ball and squared for McGrath to finish.
It almost got even better as Sokler netted on the rebound after Hoilett's shot had struck a post but the forward was flagged offside.
Instead, County hit back.
First, Connor Randall hit the outside of a post before Jordan White got the wrong side of MacDonald and was bundled over.
The defender was deemed to have denied a goalscoring opportunity and both the spot-kick and red card stood following a VAR check. Dhanda smashed in.
Against 10 men, County ramped up the pressure but their delivery let them down and they still have work to do to be in the Premiership next season.
Player of the match - Junior Hoilett (Aberdeen)
Another survival mission for County - analysis
The season has been nothing but eventful for County.
They started with Malky Mackay in charge after he oversaw survival via the play-offs last season. By mid-November, he had gone and in came Derek Adams for a third spell in charge.
However, it was an unhappy reunion. Adams criticised the quality of the Premiership and before too long followed Mackay out the exit door via resignation in February.
Cowie, whose playing career was bookended by spells at County, was seemingly the last man standing and he certainly improved results, just not well enough to seal safety via league position. Two tense meetings with Raith await.
For Aberdeen, incoming manager Jimmy Thelin will arrive from Elfsborg next month and the Swede, like all Premiership managers, faces a big summer of recruitment to improve the club's fortunes.
What they said
Ross County interim manager Don Cowie: "Congratulations to Craig [Levein] and St Johnstone. They did the job that they needed to do.
"Unfortunately, we came up short in terms of us getting the victory. But, again, I'm extremely proud of the group. They kept fighting right until the end."
Aberdeen interim manager Peter Leven: "It was tough at the end but we knew County had to throw everything at it. The boys showed great character and dug it out.
"I'll speak to [Jimmy Thelin] next week, hopefully, and talk about the squad."
What's next?
Ross County visit Raith Rovers on Thursday (20:00 BST), with the return leg of the Scottish Premiership play-off final next Sunday (12:00).
Aberdeen's season is at an end and they will start their next campaign in the League Cup first-round group stage.