Leigh Griffiths' double earned Hibernian a vital 3-2 victory over Dunfermline at East End Park.
Andy Kirk opened the scoring for Dunfermline after 10 minutes, with Griffiths levelling the match 12 minutes before half-time.
Substitute Garry O'Connor put Hibernian ahead on 75 minutes before Liam Buchanan levelled the match again with eight minutes remaining. The home side were dealt a devastating blow only a minute later however, when a rapid Hibs breakaway ended with Griffiths' shot slipping through the hands of Iain Turner.
Defeat left Dunfermline four points adrift of their opponents at the foot of the table.
The home side grabbed the opening goal after 13 minutes when Kirk nodded home from six yards out after an excellent delivery from Joe Cardle.
After a period of sustained pressure Hibernian levelled the match as Griffiths latched on to David Stephens' header and calmly slotted beyond Turner.
Good work by Paul Willis led to Cardle forcing Mark Brown into an excellent stop, but the hosts fell behind only a minute later as Griffiths laid the ball inside to O'Connor who fired the ball beyond the helpless Turner.
After falling behind the hosts upped the pressure and with eight minutes remaining they levelled the game as the Hibs defence failed to deal with Martin Hardie's free-kick and Buchanan was on hand to blast the ball low into the bottom right-hand corner.
Following their deserved equaliser the hosts were dealt a devastating blow when a rapid Hibernian breakaway ended with Griffiths' shot slipping through Turner's grasp and into the net.
Dunfermline searched for their second equaliser of the match and were almost handed a gift when Brown failed to handle Cardle's shot but Stephens was on hand to save the keeper's blushes.