Hamilton Accies scored two late goals to overcome First Division bottom club Queen of the South.
The hosts went ahead on 17 minutes when Matthew Paterson met Grant Anderson's cross to fire into the net.
But Kevin Smith headed home Allan Johnstone's corner to level for Queens just after the half-hour mark.
Scott McLaughlin's free-kick was tipped over by Hamilton goalkeeper David Hutton after the interval.
And Accies regained the lead eight minutes from time when substitute Dougie Imrie curled a 20-yard shot past Lee Robinson.
Grant Anderson made sure of the three points in injury time, the midfielder smashing into the top corner.
Hamilton: Hutton, Mensing, Canning, McLaughlin, McAlister, McBride (Chambers 77), Anderson, Fraser, Crawford (Currie 63), Paterson (Imrie 63), Spence. Subs Not Used: Cerny, Hendrie.
Goals: Paterson 17, Imrie 82, Anderson 90.
Queen of South: Robinson, Craig Reid, Campbell, McGuffie, Higgins, McKenna, Simmons, McLaughlin, Clark (McCusker 68), Smith, Johnston (Carmichael 83). Subs Not Used: McKenzie, Brighton, Alan Reid.
Booked: McGuffie, Simmons.
Goals: Smith 31.
Ref: George Salmond