Dunfermline are almost home and hosed for the title not that manager Allan Johnston is about to admit it.
Faissal El Bakhtaoui stole the show with a superb double, and the French-Moroccan striker thinks they are now only three wins away from raising the flag.
The Pars head to Cowdenbeath on Saturday with an 11-point lead over Peterhead, who visit East End Park on the final day of the season.
But the arithmetic looks certain to be settled long before April 30.
Bakhtaoui is now only four away from reaching his target of 30 goals.
However, the modest striker thought he was below his best despite hitting two quick-fire goals midway through the second-half to put the game out of sight.
Bakhtaoui said: “The second goal was the best I have scored for Dunfermline but I didn’t think it was my best game.
“It was a great ball from Michael Paton but I didn’t know when I tried it if it was going in. Then I saw it hit the top corner and it was unbelievable.
“It’s a fantastic win and everyone worked hard for it. If we win the next three games I think we will win the league.
“We need to keep winning and stay top, but every team works hard against us.”
Ayr almost broke the deadlock of a dull first half when Jamie Adams pounced on a Brian Gilmour free-kick but saw his shot on the turn blocked by Sean Murdoch.
Joe Cardle wasted a good opening for the Pars while Ryan Wallace fired an effort into the side netting as the home team were relieved to hear the half-time whistle.
Dunfermline then took a firm grip.
The breakthrough came on 62 minutes when Ryan Wallace set up El Bakhtaoui with a great pass and the striker sped clear to slam the ball home as Greg Fleming advanced from his line.
Victory was sealed six minutes later when El Bakhtaoui volleyed home a Paton cross with a hitch kick.
David Hopkirk, Michael Moffat and Rhys McCabe all got runs off the bench as Dunfermline ran down the clock in front of a vociferous travelling support.
Boss Johnston said: “The boys responded brilliantly to the disappointment of midweek when we drew with Albion Rovers.
“Ayr were dangerous from set pieces in the first-half, when we gave away a lot of silly free-kicks, but I thought we totally dominated the second-half.
“There are no easy games because everyone is fighting for something, whether it is relegation or the play-offs, so this is a massive three points.
“It was a hard pitch to play on and you could see the surface wasn’t great.
“It was a special second goal from Faiss and I don’t think you will see better finishing than that.
“He has 26 goals but they are all different types so he must be a nightmare to play against.
“It was actually one of his quieter games. Believe it or not, he is usually even better than that, so that speaks volumes for the way he has been playing all season.”
Meanwhile, Ayr boss Ian McCall conceded: “We weren’t good enough and Dunfermline thoroughly deserved to win.”