Homegrown hero Stevie May climbed off the bench to ensure St Johnstone will play Premiership football next season.
The Newburgh local, who starred for the club as a kid, entered this tense play-off for the beginning of the second half with the score firmly locked at 0-0. Relegation was lingering with intent.
Moments later, he opened the scoring to endear himself to the Perth faithful all over again.
It was the catalyst required and soon after home fans were again dancing in delight when Cammy MacPherson doubled the advantage.
Callum Hendry and Shaun Rooney produced delightful late finishes - both cheeky chips - to round off the win in style.
Saints had been seeking to continue a top-flight journey that had recommenced way back in 2009 when, with Derek McInnes in the hot-seat, promotion was comfortably secured from the First Division.
There had never been serious concerns of relegation until this season. It had always been about looking up, not down.
League positions from 2009 onwards were consistent and at times verging on the spectacular. Eighth, eighth, sixth, third, sixth, fourth, fourth, fourth, eighth, seventh, sixth and fifth.
Across that period, add in three major pieces of special silverware and a number of unforgettable results on the European stage and you had a club living the dream.
And having won the cup double, the general consensus was that more good times were surely just around the corner.
The glory days of 2021 could not have helped provide a better feel-good factor and platform to begin to think about penning the next success story.
But the latest chapter turned into a campaign of struggles and one where Saints tasted victory in just eight of their 38 league matches, finding the back of the net only 24 times. That was the lowest in the division.
They managed to find the back of the net twice on Friday night in the first leg at the Caledonian Stadium.
Goals from Rooney and Melker Hallberg had the Highlanders pinned firmly against the ropes.
Billy Dodds’ side were staggering, unable to retaliate and a third may well have been enough to wrap up survival there and then.
But the knockout blow never arrived. Inverness, who showed bundles of character in their play-off semi-final win over Arbroath, ducked and dived a few more jabs early in the second half before digging deeper than deep.
Reece McAlear’s late double ensured this McDiarmid Park decider fell firmly into the nail-biting category.
Saints made one change from the 2-2 draw up north. Central defender Jamie McCart missed out completely.
And that opened the door for big Irish centre-half John Mahon to make a rare start since arriving in January from Sligo Rovers. What a big night for him.
He would hope to enjoy a quiet evening alongside his defensive mates and goalkeeper Zander Clark, who has earned himself another Scotland call-up.
But the big No.1 had a hairy moment early doors when failing to deal with an aggressive Dan Cleary pass back. Luckily, the ball edged the wrong side of the post.
Inverness had certainly looked the likelier of the two teams to break the deadlock in the opening 20 minutes.
Rooney, however, soon had the home support off their seats with a lung-bursting run down the right flank. The reward was a corner, which came to nothing.
Pace was also on display up the other end when, just shy of the half hour mark, Austin Samuels burst into the box before being denied by Clark. Saints had struggled and the only positive was the scoreboard still read 0-0 at the break.
East Stand supporters unfurled a ‘FIGHT FOR THE BLUE & WHITE’ banner as Perth players reappeared.
There had been a change - and what a change it was.
May, no stranger to a special moment in the colours of this club, replaced Glenn Middleton for the start of the second half. One minute later he had opened the scoring.
James Brown provided the cross before Hallberg’s downwards header was kept out by Mark Ridgers. But there was the long-haired striker to slam home from close range.
Suddenly the tails were up. And then there was a second. What a noise inside McDiarmid Park.
MacPherson was rewarded on 53 minutes for simply trying his luck from distance. The ball deflected heavily off Sean Welsh and nestled in the back of the net. The midfielder celebrated wildly.
There remained a considerable amount of time on the clock and Inverness were always going to apply pressure.
Aaron Doran had a glorious opportunity to haul his side back into the game but guided wide from deep inside the box.
The support from the stands continued to be spectacular. The beating heart was the Fair City Unity group.
Even when the chips have been down for the majority of the season the backing has never faltered.
There was another goal to celebrate when Hendry raced clear on 87 minutes and produced a beautiful dink finish.
He deserved that for his efforts this season, but there was more.
Suddenly Rooney surged clear and, in almost carbon copy fashion, clipped in the fourth. Wonderful scenes.
When the full-time whistle sounded, the outpouring of emotion and relief was clear to see on and off the park.
St Johnstone Football Club remain in the Scottish Premiership. Thank goodness for that.