Ben Richards-Everton marked his 24th birthday with a rare goal but was happier to celebrate helping the Pars go back to the top of League One.
The Birmingham-born defender scored with a towering header on 32 minutes to add to Michael Moffat’s early opener in the tea-time clash.
It gave the Fifers breathing space against a lively Blues outfit who created several chances of their own and never threw in the towel.
However, Mickael Antoine Curier’s late header secured the points and the Pars’ return to the league’s summit thanks to Ayr’s earlier draw at Forfar.
Richards-Everton said: “We knew before kick-off that we could go top of the table but we weren’t thinking too much about that.
“But now that we’ve done it, it’s a brilliant feeling and we want to stay there. Scoring a goal is always nice and it’s great for me. I’ve been getting stick off the lads as they think I should score more because of my height. As a defender I’m just as happy with a clean sheet.”
The Pars made the perfect start when Joe Cardle’s cross picked out Moffat who had time to swivel before shooting low into the net.
Stranraer almost hit back when Ryan Thomson’s solo run saw him beat two defenders before being denied by Sean Murdoch’s brave save.
Dunfermline had another let-off when Andy Geggan appeared to upend Peter McGill in the box but the home side’s penalty claims were waved away.
The visitors needed a second goal to settle mounting nerves and it arrived when Shaun Byrne’s deep cross found Richards-Everton rising above the home defence to send his header high into the net.
The Pars put the issue beyond doubt on 72 minutes when substitute Antoine Curier was left unmarked to head Moffat’s cross behind the helpless David McGurn.
Richards-Everton added: “With the late kick-off there won’t be much time to celebrate my birthday. We’ll probably not get back until 11pm so I’ll probably just put my feet up and enjoy the rest of the night.”
Manager Allan Johnston was encouraged by his side’s display.
He said: “We knew we had to come here and win the battle because it was never going to be an easy game.
“I think overall we were the better team and you can see the strength we’ve got.
“We want to win the league and we want to win every game so we can’t take the foot off the pedal.
“We’re top of the league and I can’t ask much more than that.”