Louis Moult's outrageous 88th-minute overhead kick strengthened Dundee United's hold on third place in the Scottish Premiership as they edged out wasteful St Mirren in Paisley.
In a chaotic finale, United goalkeeper Jack Walton denied St Mirren an equaliser with a stoppage-time save from Toyosi Olusanya's penalty after the striker had been tripped by Kevin Holt.
That missed opportunity told the story of the afternoon for the hosts, who had the better chances but lacked the killer touch of Moult, whose sensational acrobatic effort snatched a vital three points for Jim Goodwin's side.
Stephen Robinson will rue his team's profligacy after they missed a number of clear-cut chances, with Richard Taylor seeing an early header cleared off the line by Luca Stephenson and Mikael Mandron smashing the underside of the bar.
Substitute Olusanya then failed to beat Walton when clean through before the United goalkeeper dived to his left to deny the St Mirren striker from the spot just four minutes after Moult's magic.
The defeat is a fourth on the bounce for the Paisley side, who have also failed to score in their last three games and now drop out of the top six.
United, meanwhile, end a run of two losses by moving four points clear in third having played two games more than fourth-placed Aberdeen.