Clinical Callum Hendry was the hero.
The forward unleashed a stunner of a left-footed strike deep in stoppage time to clinch St Johnstone a dramatic three points in Perth.
He has been a shining light in recent times and earlier had to haul Saints level following an early Kevin van Veen opener for Motherwell.
First team coach Steven MacLean was the man patrolling the touchline in place of Callum Davidson - the manager watching from home after testing positive for Covid-19.
But both would be turning away in disappointment when Motherwell gained the upper hand in the 13th minute.
That was when Jake Carroll slid the ball to van Veen and, gifted the freedom of Perth, he manoeuvred to a central position and fired beyond Zander Clark from 25 yards. A great finish but where was the pressure?
This again could have turned into a rather painful afternoon but it was not long before Saints were level.
With 21 minutes on the clock, Melker Hallberg sent in the delivery from the right and quickly on the move inside the box was the figure of Hendry.
He edged in front of his man and directed a header - another one - into the back of the net. It really was striker play at its finest.
A Perth team-mate also no stranger to a headed goal is Shaun Rooney and the right wing-back was in from the start for the first time since December after recovering from an ankle injury.
He was one of three changes from the 0-0 draw with Hibs. Murray Davidson and Nadir Ciftci were also in from the start.
Tom Sang and Cammy MacPherson missed out completely, while Glenn Middleton dropped to the bench.
Despite the goals, there had been little for ‘keepers Clark or Liam Kelly to deal with and that theme continued after the break.
There was a big scare when Motherwell substitute Kaiyne Woolery struck the inside of the post from a tight angle in the 79th minute. Straight up the other end, Jamie McCart went agonisingly close with a header.
It appeared to be a point apiece but suddenly the ball was launched long. It bounced once and then Hendry, with all his might, sent a looping left-footed peach over the head of Kelly.
The composure, technique and everything else was top class. This was a goal deserving of winning any game.
Incredibly, van Veen almost levelled with a free-kick seconds later but Clark pulled off a wonder save.