Forget about relegation.
This was the game that confirmed St Johnstone can now concern themselves with the battle to make the top six rather than the battle to stay in the division.
Callum Hendry enhanced his rapidly growing reputation with another goal, his seventh of the season, to put Tommy Wright’s side in the lead.
Hendry’s sweet first half strike was swiftly cancelled out by a Christopher Long finish that Zander Clark made a mess of.
But this was Chris Kane’s night.
Deep into injury time the substitute was mobbed by his team-mates after finishing from close range to give Saints the win their second half pressure merited with his first league goal of the season.
The gap to Hearts is now 12 points and Hamilton 11. For the McDiarmid Park side the pressure is off.
Wright made one change to his starting line-up following the weekend cup victory at Ayr. Stevie May dropped to the bench and was replaced by Jason Holt, meaning it was a 4-5-1 formation, with Hendry the lone striker.
For Motherwell, ex-Saint Tony Watt was on the bench.
It was a slow start made to the game by the home side and ‘Well enjoyed the territorial advantage in the early stages.
On seven minutes Callum Booth misjudged a diagonal ball over his head, which allowed Rolando Aarons the chance to go past him into the box. His shot on the angle had the power to trouble Clark but not the direction.
Christopher Long was the next man to try his luck, this time from a more central area and further out. He got closer to the target than his team-mate but still couldn’t find the target.
Saints’ first opportunity came on 11 minutes when Holt drilled a cross into the danger area from the left. Drey Wright had made a good run past his marker to just outside the six yard box but couldn’t keep his volley down.
Motherwell aren’t the type of team you would expect to be caught out by a long punt up the pitch from a goalkeeper but it nearly happened when David Wotherspoon found himself the wrong side of Declan Gallagher and it was only the bounce of the ball that gave the centre-back the time to recover and head it back to his own goalie.
Saints were in front on 27 minutes through a combination of a self-inflicted wound from the Motherwell defence and a top class finish from Hendry.
The Steelmen turned over the ball near their own box and after the in-form centre-forward tried to play a pass through for Wright, he got a kind break when it came back to him off a defender’s leg. There was nothing fortunate about the low well-struck shot from just inside the box which beat Mark Gillespie.
The lead only lasted five minutes, though.
After Kerr made a fine last ditch tackle on Allan Campbell, the ball came back to Long, whose shot took a slight deflection off Liam Craig. It was enough to delay Clark’s reaction time. He belatedly threw out an unconvincing right hand which only took the ball on to the post.
Even then it seemed to cross the line in slow motion as Clark made a desperate, and futile, attempt to get back and keep it out.
In no time Motherwell had the chance to follow up their equaliser with another goal when a long-throw wasn’t dealt with. Jermaine Hylton’s shot on the turn from eight yards was just wide of Clark’s right hand post.
It wasn’t all one way traffic as half-time approached, however.
When Holt sent a pass across the face of goal, Hendry was inches short of finishing it off at the back post.
Wright didn’t make any changes at the break but he was forced into one seven minutes after it when Craig hobbled off and was replaced by January loan signing Matt Butcher.
The second half was a slow-burner, with Saints gradually taking control of it.
Just before the hour mark Ali McCann did well to get his head to an Anthony Ralston cross but he was tightly marked and couldn’t keep it down.
Then the other full-back, Callum Booth, was able to whip over a dangerous near post cross that was met by Hendry. His effort was deflected wide for a corner that came to nothing.
Watt was introduced on 64 minutes, replacing Long.
Saints kept pushing for the next goal and Wright did well to hold the ball up then release Ralston on the overlap. You couldn’t fault the on-loan Celtic man’s delivery into the six yard box and Liam Grimshaw timed a tackle perfectly to deny Wotherspoon a tap-in at the back post.
The Perth men were getting closer and closer.
In the 70th minute a Hendry volley smashed off a Motherwell defender who knew little about it and when the ball came back into the box Kerr’s header hit the outside of the post.
Hendry had been superb all evening but on 75 minutes Wright opted for fresh legs up front, with Kane coming on for him.
Saints’ chances of finding a late winner were aided by Motherwell substitute Christy Manzinga getting a second yellow card for a blatant dive in the box with eight minutes left.
In stoppage time, with almost the last kick of the game, the 10 men were beaten when Kane tucked away a Kerr cross from the right to clinch a dramatic and deserved victory.