Supersub Callum Hendry was the St Johnstone hero again after scoring the goal which secured Tommy Wright’s side their first league away win of the season, and indeed the calendar year.
Not for the first time, the centre-forward came off the bench (and on this occasion back from suspension) to change a game.
His 74th minute headed winner gave Saints a deserved victory that takes them off the bottom of the Premiership and sets them up perfectly for three more winnable games before the January break.
Hearts started the game at the tempo their new manager, Daniel Stendel would have wanted but Saints got through 10 minutes of pressure and by far the best chance of the first half came their way on 13 minutes.
A ball over the top from Callum Booth should have been easy enough for the home defence to deal with but Zdenek Zlamal came charging out of his box and Michael O’Halloran beat him to it.
The Perth attacker took it round the keeper but, when all that was needed was a sidefoot into the net, his shot was too close to Aaron Hickey, who cleared from near the line.
Matty Kennedy then couldn’t manage to put away the rebound.
There wasn’t much more in the way of penalty box action for the rest of the half and it was Kennedy who was next to come close for Saints seven minutes after the break.
He carried the ball from midfield, beat his man with a step-over and then dragged a right foot shot from 18 yards just past the post.
The Hearts fans were growing increasingly impatient and there was another chance for Kennedy just after the hour mark but his back post header from an Anthony Ralston cross was off target.
At the other end on 70 minutes Callum Booth did well to divert a dangerous Ollie Bozanic free-kick away from danger.
Three minutes later substitute Hendry was denied by a magnificent point blank save from Zlamal.
He only had a few seconds of frustration to endure though as from the subsequent Kennedy corner the former Blackburn striker headed into the net for the opener.
Hearts had plenty of the ball in the last 15 minutes but Saints were able to see the game out without Zander Clark having to make any hard saves and the three points were going back to Perth.