A stoppage-time goal spared Dundee United's blushes as they huffed and puffed against a resilient Hamilton outfit who stuck to their game-plan throughout a tight game.
With their first attack, the visitors took a shock lead in the eighth minute but it was a goal steeped in controversy.
A deep ball to Simon Mensing was watched by the United backline as, to a man, they claimed offside. However, the official kept his flag down allowing the striker to cut a low ball across for Richard Offiong to easily knock the ball in from six yards.
The goal stunned United and they almost equalised ten minutes later when Jon Daly's head flick from Craig Conway's corner was cleared off the line by Mark McLaughlin. Almost immediately the striker was again unlucky with another header which brushed past the post.
But it was the visitors, with their five-man midfield, who continued to press with Mensing's 16-yard shot in the 37th minute narrowly missing the target while at the other end a fabulous back flick from Lee Wilkie saw Scott Robertson cut the ball back for Darren Dods but his shot was superbly saved by Tomas Cerny.
On the stroke of half-time, careless play by Conway allowed James McCarthy a shot. The Irish youngster curled in a great ball which was stopped by the fingertips of Lukasz Zaluska.
United pushed forward in the second half but became increasingly frustrated by Hamilton's time-wasting tactics and referee Crawford Allen's bizarre decisions.
The visitors had the chance to extend their lead in the 63rd minute when Robertson lost possession on the edge of the visitors box and Hamilton pushed forwards in number with Mensing setting up Offiong who skewed his shot wide with only the keeper to beat.
Allen's lack of control on the pitch finally spilled over in the 85th minute when yet another flare-up occurred. This time it was between Mensing and Conway with the former receiving a red card for his second caution.
Having missing a number of opportunities, United finally grabbed their reward for their efforts when Dods latched onto a Conway corner and, between him and Brian Easton, the ball was bundled into the net.