St Mirren were stung by Bruce Anderson's sucker punch as Hamilton claimed a valuable 1-1 draw in Paisley.
Jim Goodwin's men were looking to reclaim their top-six slot and dominated the opening half with a string of big chances.
Saints did eventually find the opener eight minutes after half-time with an Ilkay Durmus strike.
But they failed to build on their lead and paid the price as Anderson pounced for the second game running to hand Brian Rice's team a much-needed point.
Accies remain second bottom but only goal difference is now separating them from safety.
St Mirren – who climb back above Dundee United into the top half of the table courtesy of their own goal difference – will wonder how they were not three up by the break.
Accies had Ryan Fulton to thank for that.
The keeper made his first intervention just seven minutes in as he parried away Durmus' strike, while he was relieved to see a deflected Cammy MacPherson free-kick slip wide soon after.
It was virtually one-way traffic but Saints were cursing their luck after being twice foiled by the woodwork.
The first close call came after 22 minutes as Accies defender Aaron Martin nodded a vicious Kyle McAllister corner to Jonathan Obika at the back post. The striker turned it back into the six-yard box where Hamilton's Brian Easton bizarrely headed against his own crossbar before Fulton just about clawed away.
That proved to be Martin's last involvement as he went off injured, replaced by his namesake Scott.
But the midfielder was lucky to escape serious harm himself as he jumped away from MacPherson's dangerous studs-first lunge.
Incredibly, referee Steven McLean decided it did not even merit a foul despite the blatant recklessness of the tackle.
The goal frame again came to Hamilton's rescue as Richard Tait looked to finish off a fine passing move.
His spin and finish ended with the ball bouncing back off the base of the post. If that was not enough for the Saints wing-back, Fulton then flung himself brilliantly to his left to keep out a low volley before it crept over the line.
Having spent so much of the first half on the back foot, Accies could have found themselves in front at the break had St Mirren defender Marcus Fraser not raced back to clear Anderson's shot off the line after gifting the ball to the striker in the first place.
The on-loan Aberdeen striker missed another golden chance five minutes into the second period as he nodded over from Scott McMann's cross.
But Saints got the breakthrough they richly deserved in the 53rd minute.
McAllister took his time picking a pass on the edge of the box before eventually squaring left to Durmus, whose drilled finish beating Fulton's despairing attempt to push it away.
Accies, however, are famed for their survival instincts and refused to go down without a fight.
And they hit back after 68 minutes as Anderson finally found the target at the third attempt, with his 20-yard strike taking a cruel deflection off Joe Shaughnessy's leg before flying past Jak Alnwick.
They might even have snatched a precious win as Scott Martin found Marios Ogkmpoe in behind the Buddies' defence – only for Alnwick to pull off a vital block.
No Data Analysis info