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 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 Paneka’ – 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.”