Ayr leapfrogged Queens Park in the Second Division standings after recording their second home win this week after a deserved victory.
Alex Williams nodded home to set them on their way to victory but Queens levelled six minutes later when Dean Keenan scored an own goal.
Ryan Stevenson restored Ayr's lead three minutes after the restart with a superb left foot strike.
Iain Anderson sealed the points with a superb debut long-range effort.
Both teams saw red in the final minute when Stevenson and Mark Ferry were sent
off after a touchline brawl.
Ayr: McGeown, Forrest, Henderson, Mcgowan, Easton,
Vareille (Pettigrew 83), Stevenson, Keenan, Anderson,
Wardlaw (McLeod 80), Williams. Subs Not Used: Stewart, Staunton, Robertson.
Sent Off: Stevenson (90).
Goals: Williams 14, Stevenson 48, Anderson 85.
Queens Park: Cairns, Paton, Dunlop, Sinclair, Agostini,
Trouten, Kettlewell, Cairney (Ronald 83), Dunn (McGrady 80),
Canning, Ferry. Subs Not Used: Cowie, Quinn, Reilly.
Sent Off: Ferry (90).
Goal: Keenan 21 og.
Ref: S Conroy