Match ends, Hibernian 0, St. Johnstone 1.
Joe Shaughnessy powered in a 90th-minute winner as St Johnstone inflicted Hibernian's first home defeat of 2018.
Hibs had not lost at Easter Road since a 2-1 defeat by Rangers on 13 December.
But St Johnstone captain Shaughnessy headed in a free-kick in the final minute of normal time, sealing the Perth side's fourth win in a row.
The goal spared team-mate Danny Swanson's blushes after the former Hibs man's tame penalty had been saved by Adam Bogdan just after the hour mark.
St Johnstone leapfrog Hibs into fifth and it is the second time in a year they have snatched a late victory in Leith, after Steven Maclean's injury-time winner clinched a 2-1 triumph in November 2017.
Neil Lennon returned to the Hibs dug-out after being struck by a coin in Wednesday's goalless Edinburgh derby at Tynecastle. His assistant Garry Parker conducted the post-match media duties, saying Lennon "has done enough talking over the last couple of days and left it down to me".
Never-say-die St Johnstone win again
This was a fiery battle that delivered a show-stopping finale.
Both teams played some fine stuff, but Hibs lacked the ruthlessness and precision to turn neat midfield play into goals.
St Johnstone were robust at the back and incisive up front. The powerful Tony Watt was a dynamic handful leading the line, with Drey Wright and Matty Kennedy sniping around him.
Little separated the teams in the first half, Martin Boyle driving high and wide for the hosts, before teenager Tristan Nydam thundered a vicious, swerving drive off the bar from 20 yards. Watt, galloping on to Wright's cross, flashed a header wide soon after the break.
Daryl Horgan was a constant menace for Hibs but chose the wrong option too many times in the danger zone. Boyle, then Stevie Mallan, made Zander Clark work from distance as Hibs began to motor.
Neil Lennon's troops looked poised to seize control of the contest, but then the drama begun.
Swanson left his boyhood club in September after a largely fruitless year in Leith. Back at St Johnstone for a third spell, the script was written for the little substitute to strike a telling blow.
In the 66th minute, he jinked inside Bartley, hit the deck and won the penalty. His shot from 12 yards was well-placed, but desperately weak. Bodgan went the right way and flicked it clear.
It was St Johnstone's third missed penalty in three games, each squandered by a different player.
Hibs rallied, roused by their goalkeeper's feats, and set off again in pursuit of a winner, Jamie Maclaren going close with a volley then a header.
But it was St Johnstone - resilient, never-say-die St Johnstone - who pounced. Substitute Chris Kane was wrestled to ground by Darren McGregor, David Wotherspoon bent in a cracking delivery, and Shaughnessy steamed on to it and bulleted home.
Three missed penalties, but four wins on the bounce and four clean sheets for Tommy Wright and his warriors.
'St Johnstone prove top-six credentials' - analysis
BBC Scotland's Brian McLauchlin at Easter Road
After being struck by a coin during Wednesday's tumultuous Edinburgh derby, Hibs boss Lennon was serenaded by the home fans as he emerged from the tunnel. They didn't have much more to cheer about on a blustery afternoon in Leith.
Despite dominating possession (62%-38%), Hibs rarely stretched a resolute St Johnstone defence and have now failed to score in back-to-back games.
As much as that may be down in part to poor decision-making by Lennon's midfield, a lot of credit must go to Wright, his tactics and the energy of his players.
The aftermath of what happened at Tynecastle may have left its mark on Hibs but after a fourth successive win and a fourth successive clean sheet, the Perth side are well worth their place in the top six.
'We were terrible. Created nothing' - analysis
Hibernian assistant coach Garry Parker: "We were very poor today. We created nothing going forward. We made poor decisions. I've never seen the team pass to the opposition so much. Terrible.
"Individual mistakes, decision-making, everything - there was nothing there."
St Johnstone manager Tommy Wright: "Overall, we just about deserved it. We've a lot of quality and I think you saw that today. The Hibs fans were pretty quiet.
"We played some good football and I'm really pleased. They are a good squad and that is a massive result for us."
- 3WhittakerSubstituted forMcGregorat 69'minutesBooked at 88mins
- 16StevensonBooked at 55mins
- 6BartleyBooked at 82mins
- 7HorganSubstituted forShawat 77'minutes
- 20HyndmanSubstituted forSlivkaat 69'minutes
- 17NydamSubstituted forWotherspoonat 69'minutes
- 33KennedySubstituted forSwansonat 64'minutes
- 32WattSubstituted forKaneat 78'minutes
- Nick Walsh
- Shots on Target
Second Half ends, Hibernian 0, St. Johnstone 1.
Marvin Bartley (Hibernian) wins a free kick on the right wing.
Foul by Danny Swanson (St. Johnstone).
Foul by Darren McGregor (Hibernian).
Liam Craig (St. Johnstone) wins a free kick in the defensive half.
Stephen Mallan (Hibernian) wins a free kick in the attacking half.
Foul by Christopher Kane (St. Johnstone).
Goal! Hibernian 0, St. Johnstone 1. Joe Shaughnessy (St. Johnstone) header from the centre of the box to the high centre of the goal. Assisted by David Wotherspoon.
Darren McGregor (Hibernian) is shown the yellow card for a bad foul.
Foul by Darren McGregor (Hibernian).
Christopher Kane (St. Johnstone) wins a free kick in the attacking half.
Foul by Vykintas Slivka (Hibernian).
Scott Tanser (St. Johnstone) wins a free kick in the defensive half.
Attempt missed. Jamie Maclaren (Hibernian) header from the centre of the box is just a bit too high.
Marvin Bartley (Hibernian) is shown the yellow card for a bad foul.
Foul by Marvin Bartley (Hibernian).
David Wotherspoon (St. Johnstone) wins a free kick in the attacking half.
Attempt saved. Ross Callachan (St. Johnstone) right footed shot from the centre of the box is saved in the bottom right corner.
Corner, St. Johnstone. Conceded by Efe Ambrose.