Dunfermline must win a play-off to stay in the cinch Championship after losing their final match of the regular season 2-1 to Queen of the South.
Queens’ relegation was already sealed while Dunfermline had hopes of climbing out of the bottom two – although Ayr’s victory meant even a win would not have been enough.
The hosts took the lead in only the sixth minute through Josh Edwards but an own goal from Joe Chalmers six minutes after half-time drew Queens level and Darragh O’Connor headed in the winner in the 71st minute.
Dunfermline will take on Queen’s Park in the play-offs, with Airdrieonians and Montrose also involved.
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.