Jordan Moore and Andrew Geggan netted twice as Dunfermline came from behind to beat Stenhousemuir 5-4 in a thriller at Ochilview Park.
John Gemmell bundled in from close range to give the hosts the lead in the 12th minute before Ross Smith's header doubled their advantage 11 minutes later.
Stenny midfielder Sean Lynch slotted in from the middle of the box six minutes after the break to make it 3-0 before Moore's tap-in and Geggan's strike from the centre of the area made it 3-2 after 63 minutes.
The Warriors extended their lead to 4-2 nine minutes later when Sean Higgins poked home from six yards but the game was not over yet.
Allan Smith's right-footed strike made it 4-3 before Moore netted a 90th-minute penalty to draw the Pars level.
Less than a minute later, Geggan completed the comeback when he swept the ball past Stenny shot-stopper Chris Smith to seal all three points.