DUNFERMLINE came from behind to defeat 10-man Ayr 3-2 at East End Park after conceding two goals in three minutes before halftime.

Michael Moffat, Joe Cardle and Faissal El Bakhtaoui got on the score sheet to maintain their lead at the top of League One after Andy Graham and Craig Moore had put the Honest Men ahead.

Dunfermline could easily have increased the scoreline – to fans’ chagrin, a goal was disallowed, and there were several near-misses right in the box.

The Pars had the upper hand in the pulsating match, which saw five bookings and a sending-off, but had to endure a frustrating first half.

The home side started brightly – El Bakhtaoui attempt at a header instead saw the ball bounce straight into Greg Fleming’s arms, and then Andy Geggan’s cracking free kick from 30 yards went wide.

Ayr then looked like they would take an early lead through a penalty when Craig Moore went to ground in the box on 11 minutes – but despite the cries for a spot kick, ref Nick Walsh booked Moore for diving.

Back at the Ayr end, Fleming was kept busy, forced into a two-handed save to block Cardle’s attempt, and then El Bakhtaoui’s bicycle kick from a corner.

Dunfermline’s relentless attacking paid off when they appeared to take the lead on 27 minutes. Geggan’s tap in looked perfectly legit – even Ayr were heading back to the centre for the restart – but the goal was disallowed as Cardle was offside.

Alan Forrest’s belter from 30 yards out had Sean Murdoch at full stretch 10 minutes later, then Jordan Preston passed up a chance from a Paddy Boyle cross.

Dunfermline were left shell-shocked in the closing minutes of the first half, as out of nowhere, Ayr went two up in three minutes. A corner kick found Graham, who headed it in to make 1-0 on 41 minutes.

Three minutes later, Cardle was booked after Forrest went down in the box, and Moore made it 2-0 from the resulting spot-kick.

However, Dunfermline pulled one back during time added on. In an action-packed three minutes, as the Pars pushed forward, Ryan Stevenson was booked for a foul, then Brian Gilmour was red-carded for handling the ball. Moffat stepped up to make it 2-1 just before halftime.

The second half started with as much bang as the first had ended: Forrest rounded Jason Talbot and Josh Falkingham to beat Murdoch, only to see his attempt blocked inches from the line. Preston then swooped in with an on-target shot, but the Pars defence booted it away.

But the Pars wanted that equaliser, and got it just 10 minutes after the restart. Cardle pounced on a ball sent deep across the face of goal, then fired – and the Pars hitman got the credit, although Nicky Devlin helped it in.

The great comeback arrived on 65 minutes. Talbot headed to Geggan, who chipped to El Baktaoui, whose shot from outside the box deflected past Fleming to make it 3-2.

Dunfermline came close to going four-up five minutes later. Cardle crossed from the left to Moffat in the centre of the box, but the latter’s close-range header went directly at Fleming.

By this point, play was firmly in Ayr’s half, with Dunfermline clearly dominating. However, Ayr had a couple of good opportunities: Stevenson skinned the defence, but his attempt from the edge of box was saved in the centre of goal on 70 minutes. Stevenson would also later feed Forrest, who stuck it right at Murdoch.

Sub Ryan Wallace, who had come on for El Bakhtaoui on 80 minutes, had the last kick of the game. A free kick on the D zinged over the bar – and the final whistle followed seconds later.