Martin Grehan gave the home side a seventh-minute lead from the penalty spot after his shirt had been pulled by Callum Morris.
Dunfermline's Stephen Husband hit the crossbar with a shot from 30 yards, but Stranraer doubled their lead after 39 minutes when David McKenna took advantage of some slack defensive play to beat Ryan Scully.
McKenna struck again in the second half before Danny Grainger scored a consolation for Dunfermline.
Airdrieonians stretched their unbeaten run to seven matches with a 3-0 win over Ayr United, who finished the game with nine men. Craig Barr opened the scoring after half an hour. Ayr's Adam Hunter was sent off just before the break for a bad foul on Liam Watt.
Watt scored Airdrie's second goal and Keighan Parker netted their third from the penalty spot after Kyle McAusland had been red-carded for denying Nathan Blockley a goalscoring opportunity.
Bottom-of-the-table Arbroath won 4-2 away to Brechin City with Bobby Linn scoring twice and Michael Travis and Paul McManus also netting. Andy Jackson and Robert Thomson scored for Brechin.
Stenhousemuir beat Forfar Athletic 4-1 at Ochilview. Darren Smith gave the hosts the lead with a low shot in the 14th minute after good work from Sean Higgins.
Stuart Malcolm equalised midway through the second half, heading headed home from a corner, but Sean Dickson struck twice for Stenhousemuir before Smith grabbed his second to complete the scoring.