Dumbarton ended a run of five games without a win when they beat 10-man Ayr with a killer goal right at the death.
Only two minutes remained when John Dillon fired in a shot that looked like crossing the line before fellow sub Andy Rodgers made sure with a final touch.
Ayr had started brightly with Stuart McGrady hitting the bar early on, but Dumbarton soon settled and Robert Dunn was only inches wide with a free header.
Ayr were reduced to 10 men for the fifth time in six games. Mark Smyth was shown a straight red card for elbowing Iain Russell 11 minutes before half-time.
Dumbarton dominated the second half but they looked destined to settle for only a point after home keeper Ludovic Roy put up the shutters with a string of fine saves.
Dunn and Chris Boyle both fired wide while the French keeper made a fine tip-over save from a 30-yard thunderbolt from skipper Craig McEwan.
Just when it looked like Ayr would hang on against the odds, they were caught almost at the death when Dillon and Rogers combined to spark wild celebrations from the travelling fans.