Goals from Aaron Drinan and Alan Forrest saw Ayr move up to third in the Scottish Championship with a 2-0 win at Alloa.
Drinan back-heeled his side's opener with just nine minutes on the clock when he took advantage of a mistake by Alloa keeper Kieran Wright.
Drinan drilled another effort against the woodwork but the visitors had keeper Ross Doohan to thank for keeping them level.
Forrest sealed Ayr's win in the 82nd minute when he fired into the top corner to leave Alloa just one point clear of the relegation zone.