Chris Kane was the St Johnstone stoppage time hero, securing a dramatic late winner for the Perth side against Motherwell.
It was his first league goal of the season and turned what was looking like being a frustrating night of missed second half chances into a thoroughly deserved victory.
Callum Hendry had given Saints a first half lead, with Christopher Long equalising.
Christy Manzinga got himself sent off for diving late on but by this time Saints were already piling on the pressure and had hit the woodwork.
Not being content with a point against a side challenging for a European place paid off in the 93rd minute when Kane scored and Tommy Wright was a proud manager.
He said: “They’re a good side and you could say that before the game we’d take a point.
“But I thought we totally dominated the second half and kept our foot on the gas.
“Jason (Kerr) does brilliantly to give and go and I’m always on at my strikers to make a run at the front post.
“I’m really pleased for Kano because he’s taken a lot of stick but he knows he’s got a manager who respects him and appreciates what he does for the team.
“The three points are massive for us. They keep us in touch with the teams above us and move us eight points above St Mirren, 11 above Hamilton and 12 above Hearts.
“We won’t get over confident because there’s a long way to go but with another couple of wins we can really start to think about moving up the table.”
Motherwell boss Stephen Robinson said: “Of course I’m disappointed.
“We were 1-1 with 10 men and had possession of the ball twice. We didn’t see this game out well or manage it well.
“We have to learn from that. We had to take our point and get away.
“All is not awful even though we’ve not won a few games. We’ll deal with it and move on. St Johnstone were better than us.”