Falkirk's lead at the top of the Championship is down to five points after Ayr United found their scoring boots against the depleted visitors.
Ross MacIver knocked Falkirk in front from close range after just two minutes but John McGlynn's side were down to 10 soon after when Luke Graham was sent off for a deliberate hand ball denying a goal-scoring opportunity.
Four goals inside six minutes turned the game on its head, with Connor McLennan nodding in and Alfie Agyeman restoring visitors' lead before Ben Dempsey found the top corner from distance. A Scott McMann header then put the hosts in front for the first time.
Scott Brown's team took control in the second half, with substitute Alfie Bavidge scoring twice - the first from a scramble, the second a glancing header.
Ayr sit third, seven points behind Falkirk, while second-placed Livingston have a game in hand on the leaders.