Ayr made it three successive away wins and leapfrogged Dunfermline in the cinch Championship table with a 1-0 victory at East End Park.
The Pars should have taken an early lead when Josh Edwards blazed over and were made to pay in the 10th minute as Logan Chalmers scored his fourth goal in as many games after some excellent build-up play.
The visitors went close to doubling their lead shortly afterwards when Mark McKenzie ran clear only for Aaron Comrie to make a last-ditch tackle which prompted Dunfermline manager Jake McPake to make a double substitution.
The hosts piled on the pressure after the break and went closest through Ben Summers, whose shot struck a post and the follow-up from Alex Jakubiak was brilliantly saved by Charlie Albinson.
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.