Goals from Ryan Stevenson and John Sutton gave Hearts fans some much-needed cheer as they ended their five-match losing streak.
Stevenson struck in the 32nd minute following a counter-attack and Sutton ensured Hearts moved into 10th place in the Clydesdale Bank Premier League, six points behind sixth-placed Hibernian with three games left until the split.
Hearts could have had more, with Michael Ngoo alone having more than half a dozen decent chances, while St Johnstone also created a number of opportunities, especially in a frantic first half. Both sides had goals disallowed.
The victory will have come as a huge relief for caretaker manager Gary Locke on a day when the board attempted to reassure supporters after the apparently financially stricken Vladimir Romanov resigned from the board of UBIG, the club's majority shareholder.
Fans looking for an escape from off-field concerns got one with an incredibly open first half which began with St Johnstone threatening twice inside two minutes.
Mehdi Abeid was inches away from connecting with Rowan Vine's cross and the pair soon linked up on the break, with the latter forcing Jamie MacDonald into a decent block.
Sutton just missed the top corner with a header and he had the ball in the net in the 12th minute but was flagged offside after bundling home Darren Barr's low cross.
Saints went back on the attack and Murray Davidson side-footed Liam Craig's cutback towards the corner but MacDonald got down well.
Sutton soon had another chance when Mehdi Taouil flicked the ball through but Alan Mannus was off his line quickly to block and MacDonald saved from Steven MacLean.
The game continued to rage from end to end as typified by the opening goal.
Taouil took a quick free-kick on the edge of his box and Sutton managed to get the ball wide to Arvydas Novikovas to leave Saints outnumbered.
The Lithuanian winger played a low cross towards Ngoo but Mannus was again out to foil the Liverpool loan striker. However, the ball broke for Stevenson to drill home from 18 yards.
Ngoo twice broke down the left soon after but Mannus saved his first effort and the tall striker then curled just wide.
Steve Lomas brought on Gregory Tade for Abeid in the 40th minute and the forward was immediately involved, setting up Craig to fire home, although the flag was up before the midfielder shot, and then getting his own strike away to force MacDonald into a diving save.
There was still time for Ngoo to have three more decent efforts before the break, with his closest attempt foiled by Callum Davidson as he stumbled towards goal after skipping past Mannus.
St Johnstone, with Steven Anderson on for Frazer Wright, had the first chance of the second half when captain Dave Mackay curled a free-kick on to the roof of the net.
But there was less goalmouth action after the break as Hearts got men behind the ball, although they looked a threat on the break and Ngoo flashed a shot wide after a Sutton flick-on.
There were soon chances at both ends following free-kicks, with Murray Davidson heading just wide before Ngoo sliced past the post.
Tade almost levelled in the 74th minute when he headed Mackay's cross past MacDonald but Andy Webster hooked the ball off the line.
But Hearts sealed the points in the 83rd minute. Ngoo brushed off Anderson in the right side of the penalty box and rolled the ball across the goalmouth for Sutton to tap home.
Assistant referee Francis Andrews disallowed his second goal of the game when he ruled the ball out of play just before Mackay crossed for Tade to convert with an overhead kick.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article