Match ends, St. Johnstone 1, St. Mirren 0.
St Johnstone earned a first win in nine Scottish Premiership games - but only after Simeon Jackson botched a Panenka penalty for bottom side St Mirren.
The Paisley side would have moved above Dundee before the two meet on Saturday had they avoided defeat, but will rue Jackson's dreadful scuffed spot-kick.
Within four minutes of that, the Perth side led, Chris Kane capitalising on a sloppy Matteo Muzek header to jab in.
St Mirren ended the game with 10 men after Ethan Erhahon was dismissed.
The 17-year-old saw red for an ugly lunge at Richard Foster and will miss the visit of Dundee, who remain a point ahead of St Mirren with eight games of the campaign remaining.
St Johnstone, meanwhile, have kept their top-six hopes alive, sitting four points behind sixth-place Hibernian with three games to the split.
Failings at both ends for St Mirren
In a five-minute period manager Oran Kearney would probably rather forget, St Mirren spurned a glorious opportunity from the penalty spot after Jason Kerr was deemed to have barged Brad Lyons. Then Muzek's error was seized upon by the sharp-looking Kane.
St Johnstone looked the more confident, despite having not won in nine games in all competitions, and the visitors' frustration in the opening half was evident as goalkeeper Vaclav Hladky was booked for having too much to say to referee Steven McLean.
The fans rallied in an attempt effort to lift St Mirren, who are in a perilous position in what is their first season back in the top flight, and it was more positive from the Paisley side in the second half.
Jackson at times appeared to be on a one-man mission to make up for his mistake. Substitute Duckens Nazon made a difference, too, with his physicality and fired over from a promising position, while Kyle McAllister also went close.
St Johnstone were not done though, and the hosts had a chance to kill the game through Murray Davidson but his touch was heavy.
The Paisley team tried again to find an equaliser but the lack of quality that has left them bottom of the table cost them once more, as St Johnstone snuffed out any real danger. Erhahon's sending off was just a final blow.
'Time and a place for a Panenka' - analysis
BBC Scotland's Tyrone Smith at McDiarmid Park
There are a number of key moments during a football season - Simeon Jackson's penalty miss in Perth was undoubtedly one. There is a time and a place to try something like that, but not in the heat of a relegation battle, where fine margins can prove to be so decisive.
St Mirren return south perhaps with thoughts of what might have been, but St Johnstone are back to winning ways and back in touch with Hibs in the battle to secure a place in the top half of the table.
'We lacked a bit of quality' - reaction
St Johnstone manager Tommy Wright: "Happy to win, but the performance maybe wasn't what we wanted. There were too many mistakes and we lacked a bit of quality.
"The key point is Zander Clark saving the penalty - I don't think it was a penalty - it keeps us in the game and doesn't give them a lift."
St Mirren manager Oran Kearney: "I thought we looked very frustrated. We really huffed and felt sorry for ourselves because the start had gone against us and we wasted the first half.
"But it's still in our hands, we've a lot of big games ahead of us. Games that are going to look like this, have that level of edge that this had. But we've got to be smarter when we get into those games."
- 33KennedySubstituted forWattat 68'minutes
- 1HladkyBooked at 38mins
- 8FlynnSubstituted forNazonat 56'minutes
- 39ErhahonBooked at 88mins
- 23McAllisterSubstituted forDreyerat 66'minutes
- Steven McLean
- Shots on Target
Second Half ends, St. Johnstone 1, St. Mirren 0.
Paul McGinn (St. Mirren) wins a free kick on the left wing.
Foul by Scott Tanser (St. Johnstone).
Corner, St. Johnstone. Conceded by Mihai Popescu.
Corner, St. Johnstone. Conceded by Anders Dreyer.
Ethan Erhahon (St. Mirren) is shown the red card.
Foul by Ethan Erhahon (St. Mirren).
Richard Foster (St. Johnstone) wins a free kick on the left wing.
Jack Baird (St. Mirren) wins a free kick in the defensive half.
Foul by Christopher Kane (St. Johnstone).
Corner, St. Johnstone. Conceded by Paul McGinn.
Foul by Jack Baird (St. Mirren).
Joe Shaughnessy (St. Johnstone) wins a free kick in the attacking half.
Corner, St. Mirren. Conceded by Scott Tanser.
Attempt blocked. Duckens Nazon (St. Mirren) right footed shot from outside the box is blocked.
Corner, St. Mirren. Conceded by Joe Shaughnessy.
Attempt missed. Mihai Popescu (St. Mirren) left footed shot from the centre of the box is too high.
Corner, St. Mirren. Conceded by Scott Tanser.
Corner, St. Johnstone. Conceded by Mateo Muzek.