St Johnstone striker Tony Watt scored his first goal since the summer to brighten up a dull day in Paisley.
There was just a minute of regulation time left on the clock when he headed home the winner to take all three points home to Perth.
It was Saints’ fifth successive away win and their supporters went wild at the airport end of the stadium.
Watt had not his the back of the net since grabbing the winner against Dundee on August 25 and he celebrated accordingly, sprinting up the side of the pitch towards the home dugout.
It was about the only thrilling thing that happened in the game but nobody wearing blue was too bothered about the lack of entertainment value.
They had made two changes to the team that started the narrow loss to Rangers.
In came Watt and Danny Swanson, with David Wotherspoon and Ross Callachan dropping down to the bench.
Both Cammy Smith and Adam Hammill returned for the Buddies, with Ryan Edwards and Cody Cooke missing out.
The visitors were looking for their fifth successive win on the road but the first half-chance fell to the hosts when Hammill’s freekick flew past the far post.
Watt’s header then missed the post by a yard for St Johnstone’s first opportunity on five minutes.
Saints had a shout for a penalty on 13 minutes when Stephen McGinn challenged Murray Davidson inside the Buddies’ box but referee Kevin Clancy decided it was a fair tackle.
The fallout was that Davidson had to hobble off injured and was replaced three minutes later by Callachan.
It was scrappy, uninspiring stuff from both teams and, remarkably, the crowd had to wait until the 42nd minute for the next attempt on goal.
It was from home player Hammill and even then the strike never really troubled Saints goalie Zander Clark as it raced past the post.
The first period was a like game of chess without the exciting bits.
Therefore, a mighty sigh of relief greeted the half-time whistle and everyone could hope for a vast improvement after the break.
The signs were reasonably promising and, on 50 minutes, the McDiarmid team came close with an edge-of-the-box strike from Callachan after a hash of a clearance from Alfie Jones had gifted him the ball.
Callachan was booked for simulation then St Johnstone had another spotkick appeal ignored when Watt fell to the floor on 55 minutes.
With an hour gone, the visitors’ search for a breakthrough saw Watt try to squeeze a shot through the defence but it was deflected out for a corner, which came to nothing.
St Mirren were starting to feel they could get a precious point or three out of this game and Paul McGinn saw his shot blocked on 64 minutes before Smith’s strike suffered the same fate.
Saints had brought on Wotherspoon for Swanson before, with 72 minutes gone, St Mirren keeper Dean Lyness did well to tip an angled drive from Richard Foster over the bar.
The hosts brought on Ryan Flynn for Smith three minutes later as they, too, looked to freshen up their side for the closing stages.
Chris Kane came on for the visitors, with Kennedy making way, before St Mirren survived after Lyness did well to save from Scott Tanser. The loose ball hit home player Ethan Erhahon and flew in the opposite direction but still stayed out the net.
The match was crying out for a goal and it nearly came on 84 minutes.
It was St Johnstone who threatened, with sub Kane shooting inches wide after Jason Kerr had nodded down a Liam Craig freekick.
Boss Wright spun on his heels, shook his head and headed back to the dugout from the touchline in frustration.
He just had a wee while to wait, though.
With just a minute left on the clock, Watt made himself the Boxing Day hero.
Sub Wotherspoon took a throw-in that found Tanser, who flashed a cross into the danger area and Watt powered his header past Lyness.
It was a wonderful way to end a rather dull festive fixture.
Attendance: 4,891.
St Mirren: Lyness, P. McGinn, S. McGinn, Smith (Flynn 75), Jackson (Breadner 85), Baird, Jones, Hodson, Ferdinand, Erhahon, Hammill. Subs not used: Rogers, Kirkpatrick, McShane, Edwards, Jamieson.
St Johnstone: Clark, Tanser, Alston, Shaughnessy, Davidson (Callachan 16), Swanson (Wotherspoon 69), Kerr, Foster, Craig, Watt, Kennedy. Subs not used: Hurst, Kane, McMillan, Gordon.
Referee: Kevin Clancy.