A wonderful goal from Paul Dalglish earned Livingston their first SPL win of the season and saw them leapfrog Dunfermline at the bottom of the table.
The Fifers were well on top in the first half and went close when Yannick Zambernardi's lob hit the crossbar.
Livingston's Jason Dair also struck the woodwork in the opening 45 minutes, while Allan Walker shot narrowly wide.
On the hour, Dalglish picked up a loose ball 25 yards out before bulleting a shot past goalkeeper Allan McGregor.
Livingston finally got a league victory, 15 games into the campaign, but the home team will feel hard done by.
Both sides, who have been drawn to face each other in the CIS Insurance Cup semi-finals, lack quality and that was evident in a match low on thrills.
Dunfermline looked sharper early on at East End Park and it wasn't long before they had the Livingston goal under pressure and goalkeeper Ludovic Roy was called into action.
A flick from Craig Wilson was intended for Derek Young but Roy raced off his line to smother before the Pars forward could pull the trigger a yard out.
Zambernardi then tried his luck with an effort from the edge of the box which smacked off the crossbar.
Livi had a decent chance of their own when Dair unleashed an opportunistic 25-yard drive, which was also found the crossbar.
Dunfermline hit back through an Iain Campbell left-footed volley that flew just too high.
Roy was called into action again when Greg Ross surged into the box but the goalkeeper blocked the shot with his legs on the six-yard line.
But Walker gave the home side a scare at the stroke of half time when his shot whistled wide.
The lively Dalglish threatened in the second half when he lobbed the ball across the face of goal and just wide of target.
His perseverance eventually paid off when he fired Livingston into the lead in impressive style, collecting a loose ball 25 yards and smashing it home.
Dunfermline had the chance to drag themselves back into the game but Campbell's free-kick was stabbed wide by Noel Hunt.
Livingston were pinned back in the final stages but held out for the final whistle to hand manager Paul Lambert his first taste of victory in the SPL.
Dunfermline: McGregor, Ross, Scott Wilson, Shields, Zambernardi (Burchill 73), Craig Wilson (Horsted 72), Mason, Derek Young, Campbell, Tod, Hunt. Subs Not Used: Halliwell, McCunnie, Tarachulski, Labonte, Dunn.
Livingston: Roy, Mackay, Pinxten (Dorado 78), Strong, Tierney, Brittain, Neil Barrett, Walker, Dair, Dalglish (Snodgrass 72), Pereira (McPake 52). Subs Not Used: McKenzie, Scott, Miller, Vincze.
Booked: Strong. Goal: Dalglish 61.
Att: 6,016
Ref: K Clark