Dunfermline face the relegation play-offs after their 2-1 defeat at home to bottom club Airdrie saw them finish ninth in the First Division table.
The hosts made a strong start and were unlucky not to have gone in front in the 21st minute when Joshua Falkingham hit a post from 10 yards out.
The Pars came close once again a minute later when Ryan Thomson clattered the crossbar with his effort.
The visitors flew out of the blocks in the second period and went ahead within 50 seconds of the restart when Liam Coogans scored his first goal for the club from 10 yards out.
Jim Jefferies' men equalised in the 58th minute when Ryan Thomson fired in from the middle of the box, but the Diamonds won the game four minutes later when William McLaren rifled home from 25 yards to make it 2-1.