Ali Crawford netted a late winner for St Johnstone at 10-man Livingston as Callum Davidson’s side picked up their first win in 13 games.
The Lions had looked more threatening after the break but Crawford was on hand to tuck away Glenn Middleton’s cut back in the 90th minute.
The away team had taken the lead through Callum Hendry but Bruce Anderson pulled Livingston level before the break.
The hosts ended the game with 10 men after substitute Joel Nouble picked up two bookings in quick succession in injury time.
Livingston made two changes to the team that beat Hibernian at weekend, with Anderson and James Penrice coming in for Nouble and the injured Louis Longridge.
Saints handed a debut to Melker Hallberg, while new recruits Tom Sang, John Mahon and Jahmal Hector-Ingram were named among the substitutes.
Livingston winger Alan Forrest saw plenty of the ball in the early stages and twice had an attempt at goal.
Forrest, who turned down a move to Saints last month, cut inside from the left flank before then hitting a low drive just wide.
But it was the visitors who stormed ahead after 11 minutes through Hendry. Daniel Cleary floated a cross towards the front post and Hendry – recently recalled from his loan at Kilmarnock – glanced a header past the despairing Max Stryjek.
The hosts continued to probe as they looked to restore parity and the equaliser arrived in the 34th minute.
Forrest burst free down the left flank and his cross was slammed into the net by Anderson from close range.
A lively start to the second half saw Hendry flash a shot wide.
Forrest then drove into the area at the other end before drilling an effort wide at the front post.
Forrest was clearly in the mood and was involved in everything going forward for the home side.
The former Ayr United player did well to create space in the area before his left-footed drive was deflected wide.
From a free-kick 25 yards out, Forrest then had a curling shot pushed behind by the alert Zander Clark.
But it was St Johnstone who left with the points after Crawford found the net from close range 20 seconds from the end of normal time.
Livingston came close to equalising again but Nicky Devlin’s low shot struck the outside of the post.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country