A Richard Brittain penalty just after the hour mark was enough to secure Ross County's future in the top flight as they beat Hibernian 1-0.
- Related Content
In an engrossing match which produced chances at both ends throughout it was the County skipper who kept his nerve to slot away the spot-kick award after Jordan Slew was upended in the box by Scott Robertson.
Hibs must now secure their future in their final match of the Scottish Premiership season against fellow strugglers Kilmarnock on Saturday - and they could find themselves in second-bottom place beforehand if results go against them on Wednesday night.
The County goal survived an early scare in the second minute when a pass back from Filip Kiss went out for a corner. But the home side eventually cleared the danger.
The visitors looked up for it from the start and an Alex Harris effort was booted clear by Erik Cikos.
Hibs continued to press and a defence splitting pass from Danny Handling let in Jason Cummings but his shot from just inside the area was charged down by Mark Brown in the County goal.
County threatened in the 21st minute when they won a corner on the left. Brittain swung the ball over to the back post but Yoann Arquin failed to get a shot on target and the ball went out for another corner on the other side.
The home side were coming more into the match and a Brittain ball into the box was knocked on by Melvin De Leeuw but Slew just failed to get a final touch in front of goal.
At the other end a Harris free kick was met by Robertson but his downward header bobbled a yard wide of the upright.
County had the chance to threaten again eight minutes from the break when they were awarded a free kick 25 yards out. Brittain floated a ball to the far post but Slew's header flew well over the target.
The home side came closest to a goal four minutes from the interval when another Brittain free kick was head flicked on to the inside of the far post by Arquin but the rebound was cleared.
It was the visitors' turn to come close a minute later when a Harris corner was headed narrowly over by Liam Craig.
In the first incisive move of the second half, Kiss spread the ball out to De Leeuw and his cross to the far post was met by the head of Brittain but Ben Williams made the save at his near post.
But the deadlock was broken when County were awarded a penalty in the 63rd minute. Slew was taken out in the box by Robertson after being put in possesion by Arquin. Brittain stepped up and drove the ball into the corner of the net.
Slew made a darting run into the box but he ran out of space and Williams gathered.
It was end to end stuff and Cummings was not far away with a snap shot which flew just wide of the far post.
Then substitute James Collins headed wide at the back post with time running out for the Edinburgh side.