Ronan Hale's "massive" 96th-minute penalty rescued a draw for Ross County against Dundee, relegated St Johnstone, and ensures both these sides go into the final game still battling to secure their Scottish Premiership status.
It looked like Scott Tiffoney's strike early in the second half had secured safety for Dundee and set up a last-day showdown between St Johnstone and County to avoid finishing bottom.
However, deep into stoppage-time, Antonio Portales was penalised for a handball and Hale smashed home from the spot to secure a priceless point for the visitors.
"It's massive, it means on Sunday it's all to play for," County manager Don Cowie told BBC Scotland.
"I know Dundee will feel aggrieved in the manner [it came]. It was a pretty nothing cross, they win the first and it hits their second defender on the arm.
"They'll be really disappointed, but we were probably due that little bit of luck and we'll certainly take it."
Dundee knew a win would allay their own relegation fears, but County edged the first half, going close through Hale and Akil Wright. At the other end Seb Palmer-Houlden was denied by a good save from Jordan Amissah.
Tony Docherty's interval introduction of Tiffoney proved inspired as the substitute fired home after an exquisite from Lyall Cameron carved County open.
Dundee then bombarded the visitors' goal as Palmer-Houlden, Joe Shaugnessy and Simon Murray forced Amissah into smart saves.
Those missed chances would prove costly and means they visit relegated St Johnstone on Sunday, while County host Motherwell in the fight to avoid the relegation play-off place.
Docherty's side do have the cushion of a two-point advantage and a better goal difference, but they have been hauled back into a fight that they thought they had escaped.