Queen of the South made it back-to-back Scottish Championship victories with a dramatic 3-2 win over Ayr.
Patrick Reading fired Ayr in front after seven minutes when he converted from Michael Miller's cross.
However, the Doonhamers struck twice in three minutes to turn the game on its head.
Ayo Obileye converted a 29th-minute penalty after Miller handled in the box, before Connor Shields struck from 12 yards in the 32nd minute – a goal that looked like being the winner until some late drama unfolded.
Gregor Buchanan's own goal in the last minute of normal time look to have earned the visitors a point, but Shields bagged his second in stoppage time.