Peter MacDonald scored twice but the scoreline flattered the home side and victory was not assured until the last 10n minutes.
Dumbarton should have been in front in the first half when Garry Fleming's shot was hacked off the line by Declan Gallagher, with Kyle Letheren beaten.
Letheren was to prove the busier goalkeeper over the 90 minutes and did well to deny Bryan Prunty late in the first half.
MacDonald finally broke the deadlock two minutes into the second half from Martin Boyle's lay-off but Dumbarton came back strongly with Letheren earning his corn with saves from Prunty and Mitch Megginson.
Kevin McBride eased the nerves of the home fans with a stunning strike from 25 yards after 82 minutes before MacDonald completed the scoring at the death.
Livingston dismantled Raith Rovers 3-0 with youngster Marc McNulty the centre of attention after being linked with a move to Rangers.
He set up the first goal when his cross was diverted by Jason Thomson into his own net.
Martin Scott was the beneficiary of inspired play from McNulty, pouncing on a loose ball to fire home the home side's second before Stefan Scougall added Livingston's third after bursting at pace into the box and firing low across the face of Ross Laidlaw's goal. On a wretched afternoon at Central Park, Queen of the South handled the weather better to beat Cowdenbeath 2-0.
Paul Burns opened the scoring on the stroke of half-time when he touched the ball home after Grant Adam had failed to cut out a cross.
Iain Russell made it 2-0 midway through the second half to clinch the points.
Falkirk and Alloa Athletic drew 0-0 at Falkirk Stadium. The home side had the better chances: Scott Shepherd missed from close range and Phil Roberts was denied late on by Alloa goalkeeper Scott Bain.