Stirling Albion saw their title hopes disappear as they crashed to defeat at Somerset Park.
Ayr United opened the scoring when David Lowing shot home but Chris Aitken levelled from the penalty spot.
After the break, Paul Shields restored the Honest Men's lead with a deflected shot and the same player netted from a rebound on 67 minutes.
Chris Robertson was sent off for conceding a late penalty and Colin Cramb converted for the visitors.
Ayr United: McGeown, Pettigrew, Forrest, Robertson, Lowing, Stevenson, Casey, Dunn, Vareille, Shields (Fraser McLaren 85), Andy McLaren. Subs Not Used: Weaver, Wardlaw, Templeton, Johnson.
Sent Off: Robertson (88).
Goals: Lowing 21, Shields 48, 67.
Stirling Albion: Hogarth, Nugent, McNally, Graham (Marek Tomana 64), Forsyth, Bell, Aitken (Fraser 77), Devine (Taggart 77), Bingham, Cramb, Snodgrass. Subs Not Used: Cashmore, Christie.
Booked: Bell, Graham, Forsyth, Aitken.
Goals: Aitken 37 pen, Cramb 88 pen.
Ref: C Allan