Dumbarton 1-3 Hamilton Accies
Hamilton will play Dunfermline in the last 16 of the Scottish Cup after overcoming fellow First Division strugglers Dumbarton.
Alister Crawford's wonderful lob from 30 yards left home goalkeeper Stephen Grindlay helpless as Accies took the lead in 24 minutes.
Michael Devlin curled home a second for the Lanarkshire side before the break.
Chris Turner headed a response for Dumbarton before Grant Gillespie made it 3-1 and Turner was sent off.
The hosts were under the cosh in the early exchanges as Crawford tested Grindlay before Gary Fisher hit the bar.
Hamilton's efforts bore fruit in spectacular fashion after 23 minutes when Crawford attempted a lob from distance and Grindlay could only watch sail into the net.
The Accies were two goals to the good just before the break with Devlin finding space outside the box to curl home, before Jonathon Routledge hit the woodwork.
Turner gave Dumbarton hope when he met Mark Lamont's cross from the left to head in just before the hour mark, but substitute Gillespie responded with a chipped finish to wrap up the contest 15 minutes from time.
The hosts were then reduced to 10 men when Turner was sent off for a second yellow card.
Dumbarton: Grindlay, Devlin, Graham, Lithgow, McNiff, Turner, Fleming (Gilhaney 46), Agnew, Lamont, Lister, Prunty (McDougall 71). Subs Not Used: Ewings, Forsyth, Thomson.
Sent Off: Turner (78).
Booked: Turner, Graham, Lister.
Goals: Turner 58.
Hamilton: Cuthbert, Gordon, Canning, Devlin, McGlinchey, Neil (Fraser 81), Crawford, Fisher (Gillespie 69), Routledge, Longridge, Mackinnon (Ryan 84). Subs Not Used: Christie, Kirkpatrick.
Booked: Neil, Devlin, Gillespie.
Goals: Crawford 24, Devlin 41, Gillespie 75.
Ref: Bobby Madden