Despite taking the lead through Andy Geggan and pulling level through Josh Falkingham after Jordan Morton and Bob McHugh had scored for the Diamonds,McHugh's 90th minute goal meant John Potter's time as manager ended in defeat, even if undeserved, in an entertaining afternoon.

It will also be the end for some of the Pars squad with only 10 players under contract for next season, and attention firmly switches to who will take the reigns next season. It was a strong line-up selected by Potter, with Gregor Buchanan and David Hopkirk restored to the side after last week's loss to Forfar in place of Declan O'Kane and Shaun Byrne.

Youngster Jamie Wilson continued in goal after replacing the injured Ryan Scully last week and although he lost three goals on his debut, he made an excellent block to deny Ross Docherty in the fourth minute after Bob McHugh found him 12 yards out with a low cross from the left.

The visitors, clearly keen to sign off on a positive note but two half-chances for Josh Falkingham proved fruitless as El Bakhtaoui blocked a first time effort from Ryan Williamson's cross before he failed to cleanly connect with a first-time volley 20 yards out.

In the 20th minute, Airdrie keeper Rohan Ferguson kept his team level with an excellent save low to his right from Hopkirk after he was well picked out by Falkingham.

Dunfermline continued to apply the pressure and after Buchanan saw a looping header pushed over for a corner, they took a 33rd minute lead.

A short corner between Falkingham and Faissal El Bakhtaoui was worked back to Finn Graham, whose cross from the left picked out Andy Geggan at the back post to control and fire a smart finish beyond Ferguson from six yards.

A probing run from Hopkirk on the left produced a shooting opportunity that the former Annan man had no hesitation in taking on, but his low drive was held well by Ferguson.

A rising shot from Geggan failed to trouble Ferguson after Michael Moffat did well to win back possession on the left but in the final action of the half, the Diamonds levelled.

The goal came completely against the run of play as Marc Fitzpatrick's cross from the right was met by the head of Jordan Morton to send a looping header over the helpless Wilson.

The Diamonds were fortunate to be level but they took full advantage within 60 seconds if the restart as they took the lead.

Morton's inswinging free-kick from the left found the head of McHugh and his firm connection gave Wilson absolutely no chance from around eight yards.

The Pars almost responded immediately as a break on the left saw Moffat play a perfectly weighted pass into the on-running Whittle's path, but the Scouser's effort from inside the area was driven over the bar.

It was a fast start to the second half and Fitzpatrick was unfortunate not to add a third for Gary Bollan's team in the 54th minute with a speculative shot that crashed off Wilson's crossbar.

But the end-to-end nature resulted in the Pars drawing level in 59 minutes through an excellent Falkingham goal.

After receiving a lay-off from El Bakhtaoui, Geggan delivered a terrific cross to the far post which the unmarked Yorkshireman allowed to drop down before firing a ripping volley into the far corner of the net.

El Bakhtaoui then sent a weak header wide as the visitors once more took contol of possession, but Airdrie served notice of their threat as dangerman McHugh fired over from the edge of the box after a passage of neat interchange play.

They had a goal disallowed late on for a foul on Wilson following a corner but Airdrie struck the decisive blow in the 90th minute.

McHugh, a threat all afternoon, netted his brace when he collected a through pass to coolly slot beyond Wilson to ensure a desperately disappointing season ended with a 14th defeat of the season.

Pars: Wilson, Williamson, Whittle, Martin, Buchanan, Geggan, Falkingham, Graham, Moffat, El Bakhtaoui, Hopkirk.

Subs: Thomson, Smith, McAusland, Byrne, Thomas, O'Kane, Gill.

Airdrie: Ferguson, Bain, P.Boyle, Docherty, Gasparotto, Lindsay, McHugh, Fitzpatrick, Prunty, Fraser, Morton. Subs: O'Neil, Watt, McCue, Gray, J.Boyle, Stewart, Roberts.

Referee: George Salmond.