St Johnstone and Ross County’s battle to avoid the cinch Premiership play-off will go to the last day after Saints striker Adama Sidibeh grabbed a dramatic last-gasp leveller at McDiarmid Park.
County’s attacking midfielder Yan Dhanda, on his way to Hearts in the summer, thrashed in a superb goal after 28 minutes which looked like it would secure the visitors’ top-flight status.
However, Sidibeh headed in a leveller in the 90th minute to keep Saints two points behind the 10th-placed Staggies.
St Johnstone play Motherwell at Fir Park in their final league game on Sunday while Ross County host Aberdeen on the same day. Whoever finishes 11th goes into a play-off with Raith Rovers or Partick Thistle.
Neither side went into the game in fine fettle.
Saints, who had last won a home game in December, lost to a late Livingston winner in West Lothian on Saturday while the Staggies, whose victory at Kilmarnock last September was the only away league win this season, had been thrashed 5-1 at home by Motherwell.
Amid the expected frenetic start, County striker Simon Murray’s right-footed drive was saved by Saints keeper Dimitar Mitov who moments later made a much better save from George Harmon’s close-range header from a Murray cross.
The home side then had a couple of opportunities.
In the 16th minute, Ross County centre-back Jack Baldwin miskicked altogether from distance, allowing Saints attacker Stevie May to run clear on goal but a weak shot was easily saved by County keeper Ross Laidlaw.
Then St Johnstone midfielder Dan Phillips slashed a shot over the bar from 14 yards after being set up by Nicky Clark.
However, it was Dhanda who came up with a piece of magic to give County the lead, working a one-two with Jordan White and waltzing into the Saints box before thundering a left-footed shot high past the helpless Mitov.
The Saints keeper, however, made a fantastic double save a couple of minutes later, first from a powerful Harmon drive and then Murray from the loose ball, although the flag then went up for offside against the latter.
The match was stopped temporarily just before the break by referee Nick Walsh for what appeared to be a VAR malfunction but both sides got back to work in the second half, neither conceding an inch.
County always looked the more threatening but there were few chances at either end until the 65th minute when Saints substitute Ben Kimpioka fired over the bar from just inside the box.
The final stages were a times uncomfortable for the Dingwall side but they looked like they would see it out until, with regulation time just about over, Sidibeh headed in Graham Carey cross to give the home side a cinch Premiership lifeline.