Colin Healy's late winner gave Livingston a relegation lifeline and ended Inverness Caley Thistle's hopes of a top-six finish in the SPL.
Colin Healy (right) scored Livingston's winning goal
Noel Whelan, Greg Strong and Wes Hoolahan all threatened as Livingston dominated early on.
Barry Wilson forced a fine save at the other end and Ross Tokely headed the opener from the resulting corner.
But Whelan set up Richard Brittain to head in the equaliser and former Celtic midfielder Healy slotted in the winner.
It was John Robertson's first win since taking over as manager and ended a run of 13 straight defeats for the West Lothian outfit.
And it justified his decision to hand Healy his first start and restore the recently-signed Whelan to his front line.
Whelan threatened within the opening minute, unleashing a 20-yard shot that Caley Thistle goalkeeper Mark Brown got down well to save.
Strong's angled header following a corner was palmed behind by Brown as Livi played with great confidence.
Hoolahan beat two Inverness players in the middle of the park before powering a left-footed shot just wide of goal from long range.
Inverness appeared to miss the midfielder influence of Ian Black, who was missing through injury.
But they forced they began to threaten when Wilson's powerful shot was tipped behind by Roddy McKenzie.
And, from the resulting Richie Hart corner, Tokely rose high at the back post to head the ball into the gaping goal.
Livi continued to threaten and levelled the score in the 37th minute through captain Brittain following great build-up play.
Healy fed Whelan inside the box and the former Dons marksman picked out Brittain at the back post with a delicate cross for the midfielder to bullet his header past Brown.
Livi almost fell behind after the break when Dennis Wyness dispossessed Harald Pinxten, rounded McKenzie but ha his shot brilliantly cleared off the line by Strong.
Strong headed just over at the other end before Livi eventually grabbed the winner.
Brittain found Colin Healy with a defence splitting pass in the 80th minute and the Irishman showed great composure to pass the ball past Brown into the net.
And Livi held on to move to within eight points of second-bottom Dunfermline with five games remaining while Caley Thistle missed out on the top six as the SPL splits into two.
Livingston: McKenzie, Mackay, Strong, Pinxten, Tierney, Brittain, Walker (Vincze 74), Healy (Adams 83), Hoolahan, Whelan (Hislop 78), Morrow.
Subs Not Used: Roy, Snodgrass, Miller, Dorrans.
Booked: Strong, Tierney, Pinxten, Hislop, Brittain.
Goals: Brittain 37, Healy 81.
Inverness CT: Brown, Tokely, Dods, Munro, Hastings, Wilson, Hart (McAllister 78), Duncan, Morgan, Dargo, Wyness.
Subs Not Used: Fraser, Golabek, McCaffrey, Bayne, Fox, Jackson.
Goal: Tokely 16.
Ref: C Murray