Kenneth Vargas came off the bench to fire Hearts to their first domestic away win of the season and lift the Tynecastle side off the bottom of the Scottish Premiership.
A Nicky Clark own goal opened the scoring before the striker rectified his mistake, equalising from the spot prior to Vargas sealing all three points 13 minutes from time.
Barry Douglas made his first start for St Johnstone, who made two changes to Wednesday’s 3-1 defeat against St Mirren with Graham Carey coming into the side in place of Matthew Smith with Lewis Neilson ineligible to face his parent club.
Beni Baningime returned to Hearts’ midfield after missing the past three matches through illness as the Jambos made three alterations from Neil Critchley’s first defeat in midweek at home to Kilmarnock. Yan Dhanda and Daniel Oyegoke also came into the fold as Adam Forrester, Cammy Devlin and forward Vargas dropped to the bench.
The visitors were first to threaten as Malachi Boateng won possession before playing a one-two with Blair Spittal, who linked up well with striker Lawrence Shankland but the Hearts striker dragged his shot wide from 12 yards.
It was Simo Valakari’s first home match in the McDiarmid Park dug-out and the Saints looked to break the deadlock twice as Clark saw his free-kick tipped round the post by Craig Gordon before Carey curled an effort narrowly wide.
Hearts took the lead after 23 minutes thanks to a Clark own goal, a left-sided Spittal corner mistimed by the St Johnstone striker as he bundled into the far corner past the stranded Ross Sinclair.
Head coach Valakari made a drastic half-time change as Sinclair made way for Josh Rae – several corners from Spittal in the first-half had caused panic for the former Scotland Under-21 goalkeeper and his backline, and there was no hint at an injury as he trudged off the park at the interval.
The hosts looked a different proposition after the break as Carey’s pinpoint delivery found Adama Sidibeh but a point blank save from Jambos stalwart Gordon kept the door shut before Drey Wright flashed an effort past the post.
St Johnstone got themselves level after 68 minutes as Cammy Devlin wrestled Kyle Cameron inside the box following Carey’s corner and, after a two-minute delay, Chris Graham was forced to head to the monitor by video assistant Alan Muir and pointed to the spot.
Clark stepped up and converted past Gordon into the bottom-left corner.
Sub Vargas restored Hearts’ lead nine minutes later after Baningime showed great tenacity to dribble past four St Johnstone players before feeding the Costa Rica attacker inside the box to stab past Rae.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country