Ayr caretaker Jim Duffy made his firm case for the United hot seat with a third win on the trot.
Second-half goals from Steven Bradley and Tomi Adeloye sealed a crucial victory for the Honest Men on the road and promoted Duffy very much to the head of the queue in the race to replace David Hopkin.
Duffy's Ayr had to be resolute for much of this game but defended well against an Accies side who quickly ran out of ideas following a promising start.
The home side had begun brightly as they looked to avenge last week's thumping at Arbroath and Academy product Kyle Spence flashed an early effort just over.
Josh Mullin was a constant threat early doors and he had a fizzing cross hooked clear from under the bar by Paddy Reading as Ayr looked to hold firm.
United started to get a foothold in the game without creating much in front of goal, before they almost gifted Accies the lead on 25 minutes.
Reading and Sean McGinty combined to lose possession on the edge of the Ayr box and Andy Ryan stung the palms of Charlie Albinson who collected at the second attempt.

Accies should have been in front just before the break when a Mullin corner found Mihai Popescu three yards out but he sent a header over the top when the net should have burst.
Ayr were forced into a change at the break as Markus Fjortoft replaced Jordan Houston at right back and the game remained a tight affair as both sides refused to give an inch.
And as the Accies faithful began to grow restless at a lack of clearcut chances in front of goal, Ayr sensed their moment.
Adeloye did the spadework to get United up the park and played a clever ball to Andy Murdoch inside the box, and his cutback was touched home by Hibs loanee Bradley from six yards out.

That goal sucked the air from Accies' effort and Ayr quickly put the game to bed with a second.
Bradley played a defence splitting pass through to Adeloye on the edge of the box and the big striker rifled a clinical finish past Ryan Fulton to make the points safe.
And Ayr could have added extra gloss in the closing moments when Daire O'Connor hit the byline before crossing for Murdoch whose volley was saved low by Fulton.
Don't miss the latest Ayrshire headlines – sign up to our free daily newsletter here