Two second-half goals from David McFarlane saw Hamilton beat Dumbarton 2-0 and extend their unbeaten league run to 12 games.
But Dumbarton were more than a match for the home side and put them under pressure and forced the Accies into some desperate clearances.
Paddy Flannery had a glorious chance to put his side ahead a minute into the second half when he latched on to a careless pass from Alex Eadie but he lobbed the ball over the bar. McFarlane hit the first of his double after 62 minutes when he drilled an Eadie pass low into the corner.
He then struck again two minutes from time when he took a pass from substitute Michael Moore and carried the ball some 30 yards before hammering it low into the net.
Mark Nelson and Paul Gaughen had good chances to increase the lead but Ian MacFarlane had to produce a number of good saves, including a fine one-handed effort to parry a Kevin McCann header.