Ten man Livingston rescued their hopes of reaching the Premier Sports Cup knock-out stages as skipper Nicky Devlin fired home an 88th minute winner against Cove Rangers.
The Lions went into the clash knowing only a victory would do following their midweek defeat to Inverness Caledonian Thistle but they got off to the worst possible start as Esmael Goncalves saw red for an off the ball incident midway through the first half.
Things went from bad to worse just before the break when the Championship hosts took the lead in the first ever competitive meeting between the two sides. Russian stopper Ivan Konovalov was helpless to prevent Iain Vigurs firing home from outside the box.