Chris Kane's double gave Dunfermline Athletic victory over local rivals Kelty Hearts and sealed their place in the Scottish Cup quarter-finals for the first time in 17 years.
The striker, who won the Cup with St Johnstone in 2021, already thought he had put Dunfermline ahead about 15 minutes prior to his goal.
One-on-one, he rattled a shot off the underside of the bar but the ball bounced up and down on the goalline twice before being cleared by a Kelty defender.
However, the half-time substitute put his disappointment behind him to stoop down and header a Shea Kearney cross at the back stick and give Dunfermline a deserved lead.
He got his second late on when Josh Cooper jinked inside from the right and drilled a cross into the box, with Kane helping steer it home.
Dunfermline have not made it this far in the competition since 2009, when they got to the semi-finals before Falkirk beat them 2-0 at Hampden.