Reghan Tumilty sent Falkirk into the last 16 of the Scottish Cup with a dramatic last-gasp winner to see off Livingston.
The on-loan Ross County forward netted a deflected volley four minutes into injury time after meeting Louis Longridge’s back-post cross.
The highly competitive contest looked destined for a replay after Andrew Nelson spurned two great chances either side of half-time to break the deadlock for the away side.
But Tumilty found the elusive goal to set up a favourable fifth-round tie with either Formartine or Cove Rangers of the Highland League.
Falkirk trail the West Lothian outfit by 13 points in the Championship but they belied their current standing to collect their first win over the Lions this season.
The hosts were unbeaten in their previous three fixtures against Falkirk this season, winning two, and created the first meaningful chance after three minutes when defender Alan Lithgow had a header cleared off the line by Peter Grant from Steven Boyd’s corner.
The teams refused to give an inch in a highly competitive game but there was a dearth of goalmouth chances at either end. That changed in the 23rd minute when a raking Jordan McGhee cross picked out Nelson at the back post, but the forward volleyed a right-footed effort just wide from close range.
Nelson was involved again two minutes later with an overhead kick straight into the arms of Neil Alexander after the Lions goalkeeper spilled Longridge’s corner.
The away side were then awarded a contentious free-kick a minute before the break when Lithgow was penalised for a foul on Nelson, despite appearing to win the ball.
Defender McGhee’s set-piece beat the wall and brushed against Alexander’s side-netting, causing disappointment to the Falkirk fans who had cheered a goal.
Livingston goalkeeper Alexander heaved a sigh of relief when his poor clearance was not punished in the 58th minute.
The former Hearts player slipped as he attempted to connect with Gregor Buchanan’s passback and knocked the ball straight to Nelson but the forward lifted a wild effort wide from eight yards.
Former Aberdeen and Hearts marksman Liam Miller was handed his debut for the home side in the 66th minute just days after leaving Falkirk and was given a warm reception by both set of supporters.
Falkirk manager Paul Hartley was forced into another change ten minutes from the end when Tom Taiwo was caught late by Jackson Longridge, who was booked.
The midfielder received treatment on the sidelines before eventually being wheeled off on a stretcher.
Joe McKee came on to make his first appearance since being handed a four-game after being found guilty of excessive misconduct by the Scottish FA over an incident involving Dunfermline forward Dean Shiels.
But there was joy for Falkirk with literally the last kick of the game when Tumilty’s effort deflected off Lithgow and spun past Alexander.