Allan Smith was the hero for Dunfermline as they came from behind to beat Stenhousemuir 3-2 in a thriller at East End Park.
The visitors took the lead midway through the first half as Kevin McKinlay headed home Brown Ferguson's cross from six yards.
Shaun Byrne ensured Stenhousemuir's advantage lasted just 13 minutes when he found the bottom corner with a left-footed strike.
Stenhousemuir were back in front four minutes into the second half through Darren Smith's right-footed effort, but the Pars hit back again in the 67th minute courtesy of Ryan Wallace's spot-kick after he was fouled by Sean Dickson.
Allan Smith completed Dunfermline's comeback in injury time with a right-footed strike beyond Chris Smith.
The result saw Dunfermline extend their lead over fourth-placed Stenhousemuir to four points.