Relegation-threatened Dumbarton held on for a vital three points in a see-saw 3-2 win against in-form Livingston.
Dumbarton took a surprise fourth-minute lead when Brian Munty latched onto an Agnew cross to finish from the edge of the penalty area.
But Livingston levelled after 22 minutes when Jordan Morton finished neatly from close range.
A minute later Dumbarton regained the lead when Andrew Graham tucked in a Scott Agnew cross.
Livingston equalised on the stroke of half-time when the lively Iain Russell was fouled in the area by Jamie Ewings. Russell picked himself up to emphatically rifle home the penalty, his ninth goal of the season.
Dumbarton took the lead for the third time with a 69th-minute Agnew penalty after Jacobs fouled Prunty, but they had to play the closing minutes with 10 men when Mark Gilhaney was dismissed for foul and abusive language.
Mullen struck the post from 12 yards for Livingston in the 85th minute as the away team hung on.