Glebe Park passed an afternoon inspection to host its first game since January 5 and it saw the opening goal scored five minutes from half-time when McLauchlan rose to head home a Derek Carcary corner. Ayr levelled 11 minutes into the second half when Ewan Moyes headed a flick on from Michael Moffat into his own net. But just three minutes later, McLauchlan ventured forward again to fire a left-foot shot into the net.
Promotion-chasing Angus neighbours Arbroath did not fare as well as they came back from the long trip empty handed after a 2-0 defeat to Stranraer.
The home side sprang a surprise by fielding former Morton goalkeeper Colin Stewart in goal as a trialist in place of the suspended David Mitchell and the move paid off with a clean sheet and a move to 11 points clear of bottom side Albion Rovers.
The opening goal had a touch of good fortune about it on 21 minutes, although no-one in Stranraer colours was complaining. Sean Winter launched a cross goalward and visiting goalkeeper Scott Morrison got himself in all sorts of trouble and only succeeded in helping push the ball over his own line.
The second came 13 minutes into the second half when substitute Robert Love accepted a pass from Craig Malcolm before shooting home from six yards.
The Albion Rovers and Stenhousemuir match was called off after Cliftonhill was deemed unplayable.