Ayr climbed to the top of the Scottish Championship following a 2-1 victory at Cove.
The Honest Men dominated early on and Dipo Akinyemi struck the bar and Mark McKenzie also went close before they took a deserved lead after 59 minutes.
Mark Reynolds was penalised for handball and Ben Dempsey coolly struck home from the spot.
Akinyemi then gave Ayr breathing space when he tapped home from close range nine minutes later before Jamie Masson replied with a consolation penalty in stoppage time.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.