A late Jack Fitzwater goal ensured a fourth game without defeat for Livingston as they rescued a point at home to St Johnstone.
Glenn Middleton had given the Saints the lead in a drab affair as he nodded home a James Brown cross at the back post on 76 minutes but it wouldn't be enough for the Perth outfit as Fitzwater bundled the ball over the line from close range in the final stages after Zander Clark had pulled off a tremendous save to deny Scott Pittman.
Even then, the Lions almost came away empty-handed with Ivan Konovalov the late hero to deny Callum Hendry as the striker raced through on goal in the final moments.
The draw sees the West Lothian outfit jump to 45 points on the season - which represents their second-highest points tally in a top flight season.
Livingston boss David Martindale went for an unchanged line-up to the one that defeated Hibs and secured their Premiership status last weekend, meaning a 300th appearance for the club for Pittman.
The visitors went into the clash knowing only a win could see them potentially continue their fight to avoid the relegation play-off and they nearly had the perfect start as slack defending was pounced on but Hendry could only turn a ball across the face of goal over the bar inside 20 seconds.
A quick counter-attack on four minutes saw Stevie May carry the ball forward some 50 yards but could only fire a tame effort straight at Konovalov under pressure from Pittman.
A frantic opening gave way to a somewhat disjointed affair with neither side able to take control of proceedings or play anything resembling free-flowing football.
The Lions were able to fashion a decent move with Joel Nouble and Andrew Shinnie linking well down the left flank just after the half hour mark with the ball eventually played across to Nicky Devlin on the opposite flank. The skipper's cross was turned towards goal by Odin Bailey but deflected wide.
At the other end, May fired narrowly past the post for the Perth outfit with an effort from the edge of the box.
Livi had a bit more attacking intent about them in the early stages of the second half and squandered a glorious chance to take the lead on 56 minutes when Ayo Obileye's terrific ball over the top of the Saints defence was met by the charging Bailey but Clark produced a great save to deny the winger with his legs.
The hosts continued to create the better chances and Alan Forrest almost had an immediate impact after his arrival from the bench midway through the second half. In trademark fashion the former Ayr United man cut in from the left flank and curled an effort that appeared to be sneaking inside the far post but went agonisingly wide.
Livi were far from in control of the contest but Saints were offering little in an attacking sense so it was somewhat against the run of play when the Perth outfit broke the deadlock 14 minutes from time.
Brown was afforded to much time and space on the left wing with his wonderful cross to the back post being nodded home by fellow sub Middleton despite the best efforts of Konovalov.
At that stage, Saints had condemned Dundee to relegation but they were unable to hold on to all three points as Fitzwater netted a dramatic late leveller. The centre-back was in the right place to prod the rebound over the line after Clark had thwarted Pittman as the midfielder's glancing header looked set to nestle in the far corner.
Hendry passed up a glorious chance to win it at the death but a point apiece felt a fair reflection of the game.
Livingston: Konovalov; Devlin, Obileye, Fitzwater, Boyes; Holt, Kelly (Soto 80), Pittman; Bailey (Forrest 64), Nouble, Shinnie (Chukwuemeka 76). Subs not used: Maley, Longridge, Sibbald, Montano, Lewis, McMillan.
Goal: Fitzwater (90)
St Johnstone: Clark; Cleary, Gordon, McCart; Rooney, Davidson, Hallberg, Booth (Brown 58); MacPherson; Hendry, May (Middleton 69). Subs not used: Parish, Mahon, Blair, Crawford, Ciftci, Sang, Butterfield.
Goal: Middleton (76).