Substitute Andrew Shinnie’s stunning added-time winner for already-relegated Livingston against St Johnstone kept profligate Saints in the cinch Premiership relegation play-off spot.
Attacker Adama Sidibeh scored after eight minutes of an energetic start which should have brought more goals for the visitors.
The home side eventually responded and defender Cristian Montano levelled in the 72nd minute from a corner before Shinnie, on for Michael Nottingham, fired in a dramatic winner in a 2-1 victory.
Ross County remain in 10th place, despite a 5-1 defeat at home to Motherwell, and sit two points above the Perth side ahead of their crucial clash at McDiarmid Park on Wednesday night, with only one fixture remaining after that.
Saints, who slipped back into 11th spot last weekend, made a blistering start.
Attacker Nicky Clark fired just over in the second minute after taking a Graham Carey cut-back and then Livi goalkeeper Shamal George made a great save from a Stevie May header before producing an even better block from Sidibeh’s close-range header.
But Sidibeh struck moments later following another speedy St Johnstone attack.
May misdirected a shot from 12 yards and the 25-year-old, signed from English Northern Premier League side Warrington Rylands on the final day of the winter transfer window, was on hand to lift the ball high into the net from inside the six-yard box.
The home side were in complete disarray.
Saints midfielder Cammy MacPherson volleyed just wide from a Sidibeh cross before the latter forced another save from George.
St Johnstone keeper Dimitar Mitov made saves from Montano, Joel Nouble and Tete Yengi as Livi at last worked their way into the match.
However, just before the break Sidibeh should have scored his second when he latched on to a short pass from Scott Pitmann but shot straight at George.
At the other end, May was booked for tripping Yengi 25 yards from goal, but Sean Kelly’s curling free-kick was well-saved by the diving Mitov.
May blasted a shot over the bar following a corner at the start of the second half before George made yet more good saves, one following a swift Saints counter when he pushed Clark’s drive behind for a corner and another from MacPherson, who had followed in after Sidibeh’s shot was blocked into his path.
Back came Livi and captain Mikey Devlin headed straight into the arms of Mitov, but when midfielder Stephen Kelly curled a corner from the left to the back post the unmarked Montano squeezed home a low volley.
The game was there for both teams to win and Mitov made a decent save at his near post from Livingston substitute Ayo Obileye, who had also been left unmarked from a corner.
Then came a twist.
Clark had a great chance in added time when Carey sent him through, but he missed the target. Instead Livi raced up the field and, at the second time of asking, substitute Steven Bradley picked out Shinnie, who drove high past Mitov for a winner which had looked so unlikely early in the match.