Hearts climbed up to fifth place in the Ladbrokes Premiership after Kyle Lafferty’s second-half goal helped them make it back-to-back league wins for the first time since early February.
This hardfought victory at BT Murrayfield, marginally deserved on the balance of play, lifted Craig Levein’s side above both Saints and Hibs and took them within two points of third-place Rangers.
Hearts made three changes to the side that started the 2-1 win away to Ross County a week previously, with Jamie Brandon, David Milinkovic - making his first start - and Ross Callachan replacing Connor Randall, Don Cowie and Harry Cochrane.
The hosts, seeking to end a seven-game run without a win over Saints, had the first sight of goal in the 17th minute but Christophe Berra headed wide from John Souttar’s corner.
Hearts threatened again in the 37th minute when Jamie Walker ran on to a pass from Milinkovic but his low angled shot was deflected behind by Chris Millar.
From the resulting corner, again taken by Souttar, Berra’s goalbound header was clawed away by Alan Mannus as a dull first half ended in stalemate.
Prince Buaben, who had been booked after six minutes and was clearly reluctant to make challenges thereafter, was replaced by Cochrane for the start of the second half.
Hearts threatened in the 52nd minute when Walker burst into the Saints half and played a perfectly-weighted pass across the box to Esmael Goncalves but the Portuguese forward’s tame shot from 12 yards out was comfortably saved by Mannus.
The breakthrough came in the 73rd minute when Lafferty blocked a shot from team-mate Cochrane, swivelled in the box and then saw a shot of his own deflect beyond the wrong-footed Mannus. Aside from a spell of Saints pressure in the closing few minutes, Hearts never looked like relinquishing their lead. Indeed they almost added to it when Cochrane hit the post with the last kick of the match.
Hearts: McLaughlin; Smith, Souttar, Berra, Brandon; Buaben (Cochrane 46), Callachan; Milinkovic (Stockton 81),Walker, Lafferty; Goncalves (Henderson 69), Subs not used: Hamilton, Nowak, Grzelak, Moore.
St Johnstone: Mannus; Comrie, Gordon, Shaughnessy, Easton; Wotherspoon (Paton 76), Millar (Johnstone 81); Scougall, Craig, O’Halloran; MacLean (Cummins 67). Subs not used: Clark, Tanser, Alston, Gilchrist.
Ref: Nick Walsh