St Johnstone are now as close to 10th in the table as they are to the bottom after securing their second Premiership win in succession.
The gap down to Dundee and above to St Mirren and Aberdeen is six points in both directions.
It’s the first time all season Saints have posted back to back league victories.
The first of those, against Motherwell a fortnight ago, was a late show.
For this one the decisive moment of the contest came far earlier.
Callum Hendry was the match-winner once again, making it seven goals since he returned from his loan at Kilmarnock with a third minute penalty.
It started from a Melker Hallberg free-kick into the box which Sebastian Soto only half-cleared.
As Hendry and Jack Fitzwater challenged for a header, the latter caught the Perth striker with his elbow and referee Kevin Clancy pointed to the spot.
Still nursing a sore jaw as he walked up to take the penalty, Hendry went for power down the middle to beat Max Stryjek.
The visitors had more of the ball and territory in the rest of the first half but the nearest they came to equalising was when Soto drilled the ball across goal and it took a strong hand from Zander Clark to deal with the half cross, half shot.
At the other end, Stryjek saved low to his left to keep out an Ali Crawford 20-yard effort.
Gallacher injury
There was an injury blow before the break when Tony Gallacher had to be replaced by Callum Booth after being caught by Nicky Devlin when the two men went in for a midfield 50-50.
Clark was busier in the second half and he made a fine reaction save to keep out a deflected Ayo Obileye shot.
There was also a Livingston penalty shout for a Dan Cleary handball but, after over six minutes of stoppage time, Saints were celebrating another crucial win.