St Johnstone grabbed a survival save after scoring twice in the late stages to claim a 2-1 win over Motherwell.
Motherwell looked set to avenge last week's Scottish Cup defeat after taking the lead in the fourth minute from Andy Halliday's penalty.
But the lowly Saints turned the match on its head in a dramatic finish, substitute Taylor Steven equalizing in the 86th minute before Božo Mikulić struck the winner two minutes later.
The result leaves Saints seven points behind second-bottom Kilmarnock, who were beaten 3-2 at Hearts.
What the managers said…
St Johnstone the manager Simo Valakari: “Everyone can see that the fight is there. What they have done tells me everything about them, the team is very much together.
“This is the only way we will give ourselves a chance to survive, everyone must stick together.
“There's a lot of talk about momentum in football, when you have it, the ball starts jumping for you and things start falling for you. But you have to do whatever it takes to make it happen.
“We've never been able to capitalize on the positives to build momentum so far this season.
“So to come back and win it the way we did, that could be very significant.
“It wasn't luck, it just came down to the fact that the boys pushed and pushed, scored a goal and then went for another one.”
Motherwell boss Stuart Kettlewell: “We completely switched off, don't stand firmly in your own penalty area.
“At the end of the day, for me, that's where we have to ask the question about that mental strength, that mental ability to be able to endure.
“I didn't think we did well in the second half. When you start to go down, you start to acknowledge that pressure, you start to concede territory.
“You have to show far better determination to defend your penalty area. We just didn't have that – and that's the bottom line.”