Ayr snatched an early lead when they were gifted a goal courtesy of Alloa goalkeeper James Evans, who failed to clear a header and turned the ball into his own net.
This goal stung Alloa into action, and they fought hard to get back into the match, scoring a well-deserved equaliser in the 25th minute. Michael Bolochoweckyj rose unchallenged above the Ayr defence to score with a close-range glancing header.
Play swung from end to end, but it took until the 45th minute for Alloa to take the lead. Ayr's William Lyle was shown a yelow card for a foul on Richard Walker on the edge of the penalty box. In the following confusion, Iain Nicolson stepped up and calmly slotted the ball home, despite protests from the Ayr players and officials.
Ayr came close to equalising tin the 50th minute, but Craig Conway's shot was cleared from the line by Christopher Townsley. From this clearance, Alloa raced up the field and scored a surprise goal courtesy of Ayr's Barry McLaughlin, who, under pressure from Ross Hamilton, stroked the ball past his own keeper.
Alloa scored again in the 57th minute when striker Andy Brown, from within a cluster pf players in the penalty area, managed to stab the ball past John Hillcoat in the Ayr goal.
Tempers were running high and in the 61st minute, after being on the field for only three minutes, Ayr substitute Steven Ferguson was shown a straight red card for an elbowing offence on Alloa's James Stevenson.
The rout of Ayr continued, and in the 63rd minute Ian Ross was perfectly placed to drive home an Iain Nicolson cross from close range.
Ayr were awarded a 78th minute penalty following a foul on Gareth Wardlaw by Nicolson. Substitute Paddy Connolly 's kick was saved by Evans, and when Darren Henderson hit the rebound, his shot was blocked on the goal-line by Ian Ross