The drama that followed seemed unlikely during the opening stages, the biggest talking point of which was an injury to Chris Turner that cut short the Dumbarton midfielder's return from suspension. As some reshuffling took place, Livingston displayed the greater attacking intent. Andy Barrowman flashed a header wide and Stephen Grindlay saved efforts from Michal Habai and Simon Mensing.
Dumbarton's Scott Agnew sent a free kick over the bar from outside the box but the action soon returned to the other end and Barrowman showed his menace twice in quick succession, although neither effort brought the desired result.
The home side lost Garry Fleming to a second yellow card early in the second half. Booked just before the break for a foul on Jason Talbot, he was given his marching orders following an altercation with the same player, who was cautioned.
Referee O'Reilly limped off soon afterwards, handing his whistle to his standside assistant Raymond Whyte while a Livingston supporter, Colin Brown, took over on the line.
Martin Scott had a raking long-range shot saved by Grindlay before Livingston took the lead midway through the second half, Keaghan Jacobs steering an 18-yard shot beyond Grindlay's despairing dive.
Dumbarton, as they have often done this season, battled back and were level when Mitch Megginson fed Colin Nish and the substitute shot low into the net from just outside the box.
Their hopes of taking anything from the game appeared to suffer a terminal blow when Jacobs set up Barrowman for a simple tap-in but, in the fifth of 13 minutes added on for O'Reilly's injury, Kane scored from close range.