Livi on a prayer
Livingston claimed all three points courtesy of a 1-0 win in a scrappy game at home to Hamilton.
Midfielder Marc McNulty grabbed the only goal of the game after getting on the end of a Rory Boulding cross early in the second half.
The home side went in search of a second which would have sealed the tie, with Stefan Scougall forcing a fine close-range save from David Hutton.
An uneventful first half saw Mark Fotheringham and Simon Mensing booked for unsporting behaviour, while McNulty and Kyle Jacobs both tested Hutton with stinging long-range shots.
The win keeps Livingston in touching distance of leaders Ross County.