Stephen Mallan's stoppage-time strike earned St Mirren a 3-2 victory at Queen of the South - their first Championship win of the season.
Queens' Stephen Dobbie netted twice in the first half, either side of Kyle Magennis' deflected leveller.
Ben Gordon added a second equaliser for the visitors on 57 minutes.
And midfielder Mallan won it three minutes into time added on, ensuring Jack Ross' Buddies a first league victory at the 15th time of asking.
St Mirren remain six points adrift at the foot of the table.
The Doonhamers, who topped the standings as recently as October, have now lost seven successive league matches, and sit sixth.
St Mirren: Gallacher, Naismith, Gordon, MacKenzie, Irvine, Quinn (Hardie,73), Magennis, McAllister (Gallagher, 83), Mallan, Morgan, Sutton (Shankland,)
Subs Not Used: Langfield, Clarkson, McLear, Stewart
Queen of the South: Robinson, Hamill, Marshall, Dowie, Brownlie, Higgins, Anderson (Carmichael, 66) , Millar (Brotherston, 83), Lyle, Dobbie, Dykes (Pickard, 49)
Subs Not Used: Atkinson, Hooper, Moxon, Bell
Images courtesy of www.qosfc.com