Centre half Danny Griffin was the unlikely hero for Livingston after his free kick salvaged a point with two minutes left against Berwick Rangers.
The veteran Irishman struck from 25 yards to beat visiting keeper Mark Peat and kept the Lions' unbeaten home record intact.
Livi had looked set to crash to their fourth league defeat of the campaign before Griffin's timely intervention after Cammy MacDonald put through his own goal in the 70th minute.
But as the clock ticked down Gary Bollan's men showed great spirit and determination to earn a deserved point.
Berwick arguably had the better chances before MacDonald mistakenly opened the scoring. They hit the crossbar twice and were also thwarted by an instinctive Roddy McKenzie save in the latter stages of the first half.
Livi's best scoring chances came inside a few second half moments when Peat made terrific stops from a Robbie Winters header and well hit low shot from Raffa De Vita.
Livingston: McKenzie, Kyle Jacobs, Talbot, Sinclair, Griffin, MacDonald, Fox (Hammill), Keaghan Jacobs (Halliday), D. Winters (Husband), R. Winters, Da Vita
Subs Not Used: Moyes, McDowall
Berwick Rangers: Peat, Notman, Smith, Guy, Ewart, Callaghan, Little (McLaren), Currie (Russell), Brazil, Radzynski, Greenhill (McMullan)
Subs Not Used: McLean, Ellison
Referee: Kevin Clancy