
Derek Holmes grabbed the only goal as Queen of the South withstood a second-half barrage to stay on top of the First Division.
Holmes rose at the back post to head home a cross from Stephen McKenna after 20 minutes.
Queens' David Lilley flashed a header wide soon after, while Ryan Borris nodded into the side netting for Ayr.
Mark Roberts and Ryan Stevenson went close for Ayr before David Hutton saved well from Ryan McGowan late on.
Ayr United: Samson, Ryan McGowan, Gibson, Campbell (Kenneth Connolly 10), Neil McGowan, Keenan, Stevenson, Chris Aitken, Borris, Cawley (Gormley 62), Roberts (Prunty 79). Subs Not Used: Grindlay, Woodburn.
Booked: Gormley, Stevenson, Chris Aitken.
Queen of the South: Hutton, Reid (McAusland 67), McKenna, Lilley, Harris, Burns, Quinn, McLaughlan, McLaren (McQuilken 82), Holmes, Kean (Wyness 75). Subs Not Used: Scally, Wilson.
Booked: McKenna, Kean.
Goal: Holmes 20.
Att: 2,453
Ref: J McKendrick
RELATED INTERNET LINKS:
Scottish FA
BBC Sport Scotland
BBC Sport club pages
Scottish Football League
The BBC is not responsible for the content of external internet sites