Raith Rovers made it five Fife derby wins in a row for the first time in their history to keep pace with Dundee United at the top of the Championship.
Sam Stanton scored for fourth meeting this season to give Raith their first-half breakthrough against the run of play.
And Dylan Easton added a second in the 78th minute to seal victory.
There was even time for Callum Smith to see his injury-time penalty saved by Deniz Mehmet.
It means, with six games undefeated, the Stark’s Park men have gone the whole campaign without a loss against their local rivals.
Players back and others out
Raith were struck two significant blows ahead of kick-off with both Keith Watson and Shaun Byrne not fit enough to start.
With Scott Brown having to slot back into defence in place of Watson, the absence of Byrne meant a start at the heart of the home team for club captain Ross Matthews.
After mixing up his starting line-ups with a hectic run of fixtures, Rovers boss Ian Murray plumped for an attacking XI. Josh Mullin, Lewis Vaughan and Dylan Easton were tasked with supporting lone striker Zak Rudden.
In the visitors’ ranks, there was a first start for skipper Kyle Benedictus in over four months following two separate thigh injuries.
Winger Kane Ritchie-Hosler was also thrust in for his first starting appearance in three months after a dislocated shoulder that necessitated a third operation of the campaign.
The loss of Chris Kane to a calf problem was an undoubted blow for the Pars.
Dunfermline dominance
It was the visitors, determined to finish this season’s scheduled meetings by arresting Raith’s supremacy, who began on the front foot.
They bossed possession but could not carve out anything clear-cut in attack.
Rovers were resolute, with a Ewan Otoo shot bravely blocked as the Pars ramped up the pressure.
Kevin Dabrowski then repelled a Josh Edwards free-kick and held onto a Chris Hamilton header that was too straight to trouble the home keeper.
In between times, the temperature had been ratcheted up a notch. Josh Mullin appeared to lash out in a tangle on the ground, which sparked un ugly melee.
Both Mullin and Chris Hamilton were booked once calm had been restored.
Derby hero strikes again
Stanton has been Raith’s match-winner in two derbies this season, as well as scoring in another.
So, there was no surprise when it was the 29-year-old who popped up with the breakthrough goal eight minutes from the break.
Referee Craig Napier awarded Rovers a free-kick on the edge of the box and Lewis Vaughan scented an opportunity.
Deniz Mehmet batted away his curling effort but Stanton was first to the loose ball to loop his header into the net from 10 yards out.
For all the visitors’ possession, it was their Kirkcaldy foes who had their noses in front yet again.
Second-half response
Dunfermline would have felt hard done by at the interval and they emerged full of determination.
Just two minutes into the second-half, they are left with their heads in their hands after being denied an equaliser.
The ball broke to Otoo at the edge of the area. And the midfielder unleashed a ferocious drive that was destined for the roof of the net.
But Dabrowski brilliantly flung himself to his left to touch the drive over the bar for a stunning stop.
Key second goal
And it was to prove crucial as Raith went on to double their lead with 13 minutes remaining.
They won a fee-kick on the right side of the box and the quick-thinking Lewis Vaughan took it instantly.
Substitute Aidan Connolly then shuffled the ball on to Easton just inside the area. And he curled a fantastic shot into the far corner of the net.
It was the killer blow for the home side, who had been forced to defend to hang on to their slim lead.
Now, despite the late collapse that cost them against Arbroath eight days previously, they could relax.
They had the chance to make it three in stoppage time when Stanton was clipped in the box by Miles Welch-Hayes.
But Smith’s spot-kick was blocked by Mehmet before the Dunfermline defence scrambled clear.
Star Man: Sam Stanton (Raith)
With four goals this season against Dunfermline, Stanton clearly enjoys the derbies.
He was a constant threat in attack and energetic in defence for the home side when needed.
His strike came against the run of play but the first goal was always going to be crucial in a tight game.
Player Ratings
Raith Rovers (4-1-3-1-1): Dabrowski 7; J Brown 6, S Brown 6, Murray 6, Dick 6; Matthews 7; Mullin 6 (Connolly 57 4), Stanton 8, Easton 7 (Byrne 85 3); Vaughan 6 (Smith 85 3); Rudden 6 (Hamilton 67 4). Subs not used: McNeil, Thomson, Corr, Turner, McGill. Booked: Easton, Mullin, Rudden.
Dunfermline (4-2-3-1): Mehmet 6; Welch-Hayes 6, Benedictus 6, Fagan-Walcott 6, Edwards 6; Hamilton 6, Otoo 7 (McCann 72); Ritchie-Hosler 6, Todd 6, Summers 6 (Holmes 79); Jakubiak 6. Subs not used: Little, Chalmers, Moffat, Allan, O’Halloran, T Sutherland, Benjamin. Booked: Todd, Hamilton, Benedictus.
Referee: Craig Napier.
Attendance: 6,274.