Scott Brown fired Raith’s late winner as Ayr were knocked off top spot in the cinch Championship after a 3-2 defeat at Stark’s Park.
Ayr fought back from 2-0 down after Brad Young and Andy Murdoch had cancelled out first-half goals from Raith pair Kyle Connell and Sam Stanton.
But Raith midfielder Brown struck an 83rd-minute winner to halt Ayr’s six-game unbeaten start to the season.
Connell fired the Kirkcaldy side into an eighth-minute lead when he turned inside his defender and slotted home following Aidan Connolly’s cross.
Dipo Akinyemi ‘s free-kick struck a post for Ayr before Raith doubled their lead in the 35th minute as Stanton finished a sweeping counter-attack following a corner.
Ayr responded after the break and reduced the deficit through on-loan Aston Villa forward Young, who converted Akinyemi’s ball into the six-yard box.
Raith striker Connell’s shot hit the crossbar before Murdoch’s angled finish hauled Ayr level, only for Brown to drill home a low finish for the winner.
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.