Ambitions for the Irn Bru First Division title took a severe dent in Ayr as results elsewhere conspired against Falkirk.
The Honest Men won a valuable three points for their fight for survival, and if they're successful, results elsewhere indicate they're likely to face Falkirk again next term.
The Bairns lost to a 73rd minute Andy Gegggan header at Somerset Park, seconds after rattling the post through a 30 yard drive from Willie Gibson.
Falkirk have failed to defeat Ayr this season and their bogey team continued to hurt their title aspirations with a 1-0 win.
Steven Pressley - sitting in the stand for the second time of a four-game suspension - brought Mark Millar back into the team at the expense of Kris Faulds and Millar had the best chance of the first half when Kevin Cuthbert studded his angled drive clear.
Farid El Alagui also had two great chances with headers in the first half from sumptuous Kieran Duffie crosses, but the closest he came was nicking the ball just beyond the far post after ghosting in to meet the ball. Chris Smith almost turned the ball into his own net but the ball escaped across goal.
The game had been a bad tempered affair with Willie Gibson clashing with Liam Tomsett in midfield, and Jordan White and Stewart Murdoch both fortunate to stay on the park.
But all 22 players stayed on the park, to complete a second period slicked by heavy intermittent rain, and though Falkirk went even closer than Millar's shot and El Alagui's headers, Ayr hit the net.
Willie Gibson thumped a stunning 30-yard strike off the upright after a possession winning tackle by Millar in midfield. But Ayr took control of the rebound raced upfield and won a corner kick.
Adam Dodd looped the ball into the mix and Andy Geggan headed down into the turf and the ball bounced high beyond Michael McGovern and into the roof of the net.
Falkirk pushed Rhys Bennett and Craig Sibbald into attack but couldn't find the equaliser, and the misery of defeat intensified at the full-time whitle when they dropped further of the pace after Ross County defeated Queen of the South - piling more pressure on the bottom club - and third-placed Dundee came from behind to defeat Livingston at Almondvale and shut the gap to two points.
Elsewhere East Stirlingshire had a fantastic 6-3 victory over Peterhead, and Stenhousemuir saw off Forfar 2-1 at Station PArk.
FOR MORE ON THESE GAMES AND ANALYSIS OF FALKIRK'S DEFEAT, SEE THE FALKIRK HERALD ON THURSDAY