Jim Jefferies' side twice came from behind to earn the three points which opened up an eight-point lead over their third-place opponents.
Lawrence Shankland, on loan from Aberdeen, marked his debut with the winning goal with just 15 minutes left.
Steven Bell had headed Stranraer ahead after 16 minutes, but Dunfermline were level before half-time when Ryan Thomson nodded in Ross Drummond's cross.
Frank McKeown put Stranraer back in front, but Shaun Byrne equalised and then Shankland settled it. Dunfermline finished with ten men after Fayssal El-Bakhtaoui was sent off after a clash with Bell in the closing stages.
Ayr United enjoyed a 3-0 win over bottom club Airdrieonians, all of the goals coming in the second half.
Kevin Kyle's header broke the stalemate before Michael Moffat hammered home the second and Alan Forrest made it 3-0 late on.
Forfar Athletic scored all of their goals in the first half as strikes from Craig Swankie and a double from Martyn Fotheringham, the second from the penalty spot, comfortably saw off Stenhousemuir.
Bobby Barr scored the only goal shortly before half-time to give Brechin City a 1-0 win at Arbroath.