Steven MacLean handed St Johnstone a first victory in seven matches with an injury-time winner in a dramatic finish at Hibs.
Murray Davidson's 74th-minute header for the visitors was cancelled out by Anthony Stokes' controversial penalty in stoppage time, but MacLean struck with literally the last kick of the game to earn a much-needed three points in a 2-1 win for Tommy Wright's side.
Hibs had gone into the game brimming with confidence after winning four on the spin but Neil Lennon's charges paid the price for failing to get out of second gear.
The hosts started brightly and peppered Saints goalkeeper Zander Clark's goal with a series from shots from distance.
Simon Murray was first to threaten after only seven minutes but the former Dundee United marksman lifted a harmless drive over the bar from outside the box.
Scotland international John McGinn then shot wide with an ambitious half-volley from 20 yards.
Saints were short of confidence and that was reflected in their play as Wright's team struggled to retain possession for any length of time.
Hibs created their best chance of the half in the 28th minute with a move that had Wright furiously complaining to referee Craig Thomson.
Play was allowed to continue after Hibs captain David Gray appeared to accidentally trip Michael O'Halloran and Stokes swung a left-footed shot just over from Martin Boyle's lay-off.
St Johnstone were then denied a shock lead after 34 minutes when goalkeeper Ofir Marciano expertly palmed Liam Craig's 12-yard drive on to the bar.
Before the half was out, Boyle had a powerful drive from an angle outside the area beaten away by Clark.
Saints enhanced their belief that they could take something from the game and after causing the home side a scar at the start of the second period.
After Paul Paton had an effort deflected over from the corner, McGinn cleared Steven Anderson's volley off the line.
Saints then charged forward on the counter-attack in the 63rd minute and O'Halloran had a powerful drive from an acute angle pushed over by Marciano.
Hibs introduced midfielder Dylan McGeouch and the playmaker's clever chip found Stokes in the box but Murray Davidson turned the ball behind for a corner amid shouts for a penalty.
Efe Ambrose had a shot diverted wide from the set-piece before Saints nearly caught Hibs on the counter in a move that ended with Marciano tipping O'Halloran's effort over.
Hibs defender Ryan Porteous then made a great block to deny fellow substitute Graham Cummins but there was no stopping Davidson from giving Saints a 74th minute lead.
Craig's cross was headed back into the six yard box by Cummins and the unmarked Davidson nodded past Marciano.
Hibs were handed an injury-time life line when referee Thomson pointed to the spot when Joe Shaughnessy was adjudged to have handled Boyle's shot and Stokes made no mistake from 12 yards.
But MacLean struck the winner from close range after Craig's shot was blocked by Marciano.