Ayr kept their promotion hopes alive as Pat McGinlay's winner gave them a hard-fought 1-0 victory over Ross County, who crashed to their sixth successive home defeat.
Ayr scored the vital goal after 58 minutes when McGinlay latched onto a headed clearance by Derek Holmes to score with a low shot.
There were few clear-cut chances in the first half and Ayr substitute John Bradford, who replaced injured James Grady after 17 minutes, went closest when his shot flew narrowly wide.
In the closing stages, County went all out for an equaliser and striker Alex Bone saw two efforts blocked on the goalline as the visitors held firm.