These are curious times at Stirling, with an improved side apparently incapable of seeing out matches from winning positions.
Stirling led from early on and went in ahead at the interval, only to let Ayr steal the victory with a second-half resurgence.
County edged in front in the ninth minute when Jonny Hope nudged over a penalty, before Hamilton Burr showed an impressive turn of pace to be first to a hack ahead, Hope on target with the extras. Hope then stretched the advantage with his boot after 27 minutes, during which time Ayr had rarely threatened.
However, Ayr clawed their way back when Steven Longwell finished a forwards move, Scott Lyle converting. Lyle then chipped over a kick after the restart to close the gap, but it was cancelled out by a similar effort by Hope.
But Ayr hit back again when Craig Gossman crossed in the corner to set up a tantalising last 15 minutes. Lyle then chipped a kick to give Ayr the lead and he iced the cake with a try and conversion.