David White scored an own-goal and a last-gasp winner as East Fife came from behind to beat Ayr 3-2.
The hosts took the lead in the third minute of the game when East Fife defender White turned a teasing cross into his own goal from close range.
On-loan Rangers defender Kyle McAusland doubled Ayr's lead in the 17th minute when he converted David Sinclair's cross from six yards out.
The visitors flew out of the blocks in the second period and it wasn't long before they reduced the arrears.
East Fife striker Scott McBride found the bottom right corner of Alistair Brown's net from the middle of the box in the 56th minute.
McBride levelled things up from the penalty spot in the 65th minute after Marc Twaddle brought Jamie Pollock down in the box.
White then made amends for his earlier own-goal when his stunning 25-yard effort found the top corner of the net.