Josh McPake struck an 83rd-minute winner as unbeaten St Johnstone moved six points clear at the top of the Scottish Championship by coming from behind to beat Dunfermline 2-1.
Neil Lennon’s visitors led at the break at McDiarmid Park after Rory MacLeod emphatically fired into the top left corner in the 43rd minute following Jefferson Caceres’ cross.
Kai Fotheringham levelled six minutes into the second period, poking in the rebound after Pars goalkeeper Mason Munn kept out Adama Sidibeh’s header from a Jannik Wanner corner.
McPake completed the comeback by volleying home his sixth league goal of the campaign at the back post when on-loan Rangers keeper Munn opted to leave Jamie Gullan’s looping cross from the right.
Fifth-placed Dunfermline almost snatched a leveller deep into added time during a dramatic ending.
Keeper Toby Steward came to Saints’ rescue, tipping Andy Tod’s powerful free-kick on to the inside of the left post and then keeping out his follow-up effort before repelling Jeremiah Chilokoa-Mullen’s header from the subsequent corner.