Goalkeeper Ludovic Roy's error handed victory to Dunfermline Athletic and led to Paul Lambert resigning as player-manager of Livingston.
Mark Burchill's cross led to Dunfermline's winning goal
Lambert had warned he would consider his position if the Pars opened up a six-point gap at the bottom of the Scottish Premier League.
Roy let a Mark Burchill cross bounce off his chest and into the net.
And, despite some late pressure by the home side, Dunfermline held on for an important victory for the Fifers.
On-loan striker Sam Morrow had been handed his Livi debut, Emmanuel Dorado returned in place of suspended defender Greg Strong and goalkeeper Ludovic Roy replaced the injured Roddy McKenzie.
And, although Livingston started brightly, they found themselves behind after 12 minutes to a Dunfermline side welcoming Andy Tod, Stephen Simmons and Scott Thomson back into their side.
Roy appeared to be in no danger as Burchill's swerving cross speared its way towards him.
But, as the ball bounced up off the turf, the French goalkeeper only succeeded in helping it into the net.
Dunfermline lost Noel Hunt to injury and the striker was replaced with recent signing Andy Campbell after only 16 minutes.
And Livi passed up a good opportunity to equalise as Derek Adams blasted a free-kick over the bar 18-yards.
Lambert's plans were dealt a blow when David McNamee hobbled off to be replaced with Allan Walker.
Wes Hoolahan was also forced off, to be replaced with Steve Hislop after the break, following a hefty challenge from Stephen Simmons.
Dunfermline piled on the pressure as Livi took time to adjust.
Roy had to react quickly to steer a Burchill header from Darren Young's wicked corner over the bar and Tod sent a header wide.
Hislop's first real impact on the game was to fly into Bryn Halliwell as the Dunfermline goalkeeper was forced to the edge of his area to mop up Jamie McCunnie's terrible pass-back.
Adams floated in a free-kick that teased Halliwell off his line and the Englishman was beaten to the ball by Hislop, whose header slipped agonisingly wide of the post.
Dorado's header from the half-cleared initial ball had Halliwell in all sorts of trouble, but McCunnie popped up on the line to clear the danger.
But all Livi's late pressure could not save the game - or prevent Lambert from quitting.
Livingston: Roy, Mackay, Pinxten, Dorado, Tierney, McNamee (Walker 38), Dair (Dorrans 73), Adams, Hoolahan (Hislop 60), Snodgrass, Morrow.
Subs Not Used: Woods, Scott, Vincze, Miller.
Booked: Snodgrass, Tierney, Dorado, Walker.
Dunfermline: Halliwell, Shields, Scott Wilson, Darren Young, McCunnie, Thomson (Zambernardi 81), Mason, Burchill (Donnelly 83), Hunt (Andy Campbell 16), Tod, Simmons.
Subs Not Used: Paterson, Craig Wilson, Iain Campbell, Phinn.
Booked: Tod, Burchill, Simmons.
Goal: Burchill 12.
Ref: C Thomson