League leaders Queen of the South came from behind twice to beat bottom side Ayr 4-2.
Ayr took the lead in the ninth minute through Darian Mackinnon, who steered home from six yards from Kyle McAusland's knock down.
The lead lasted seven minutes as Nicky Clark equalised for the visitors, but Ayr went back in the lead in the 19th minute as Mackinnon grabbed his second.
Queen of the South fought back again and Paul Burns' 31st-minute header ensured the game was level at the break.
Gavin Reilly gave the away side the lead in the 62nd minute as he collected Chris Higgins' pass before firing past Darren Martin.
And Reilly added his second seven minutes later with a neat left-footed finish from inside the area to secure the points.