Dunfermline were knocked off the top of the Scottish First Division after suffering a shock 3-1 home defeat to struggling Airdrie.
Ryan Donnelly's double and a late penalty from Paul Di Giacomo secured a priceless win for the visitors, who moved three points clear of rock-bottom Dumbarton.
The hosts paid the price for slack defending in the fourth minute as John Boyle teed up an unmarked Donnelly to belt home the opener.
But the Pars hit back nine minutes later when Alex Whittle skipped down the left flank and whipped in a cross for Ryan Wallace to steer home at the near post.
Airdrie keeper Grant Adam then pulled off a superb reflex save to repel a Callum Morris header, while Donnelly drilled over at the other end.
Adam turned a fierce drive from Stephen Husband round the post, and Wallace dragged wide with only Adam to beat just after the break.
Paul Gallacher did well to keep out Willie McLaren's effort, but he was picking the ball out of his net again on the hour when Donnelly cut in from the left in hammered past the home keeper.
Donnelly went close to completing his hat-trick and Adam tipped over a decent effort from Joe Cardle as Dunfermline pushed for an equaliser.
But with seven minutes left, Morris was adjudged to have hauled down Jamie Bain just inside the box and Di Giacomo stepped up to beat Gallacher from the spot.