Dundee moved into the top six of the Premiership after surviving a late VAR scare to overcome St Johnstone.
The Dark Blues profited from a moment of madness by Saints keeper Dimitar Mitov to take a first half lead through Lyall Cameron, but were pinned back by a spectacular Adama Sidibeh strike as the home side grew into the game.
For long stretches of the second half, it looked as though Craig Levein’s side were the more likely to claim victory.
But the Dee, watched by owner Tim Keyes, struck with 10 minutes to go through Amadou Bakayoko to move ahead.
At the death, Saints claimed for an equaliser when the ball crossed the line during a classic goalmouth stramash.
Referee Iain Snedden awarded Dundee a free-kick, but was called to review his decision by VAR official Greg Aitken.
After a nervous wait, Snedden stood by his on-field call, sealing a win for Dundee that moved them into the top half of the table.
First half
Saints boss Craig Levein, as he had hinted all week, paired Nicky Clark and Adama Sidibeh up front, with Max Kucheriavyi stepping into midfield in the absence of the injured Sven Sprangler.
Tony Docherty made one change to the side who started Dundee’s win over Aberdeen two weeks ago, with Amadou Bakayoko in for the injured Curtis Main.
Back on the bench were fit again Jordon McGhee, Zach Robinson and Ryan Howley, but Trevor Carson was not named in the Dark Blues’ squad.
Docherty’s side came straight out of the traps and threatened the hosts’ goal inside a minute, but Scott Tiffoney’s shot after a jinking run into the box was blocked.
Luke McCowan tried his luck from the edge of the box as Dundee continued to threaten, and the opener arrived minutes later in bizarre circumstances, when Saints keeper Dimitar Mitov’s rush of blood to the head saw him sprint 35 yards out of his box for a through-ball, only to head the ball straight to Bakayoko.
The Dee star fired the ball off Mitov’s outstretched arm and Lyle Cameron reacted quickest to fire into the empty Saints net from distance.
Mitov’s red face was deemed punishment enough by referee Iain Snedden, who seemed content to award the goal without action against the blundering Saints keeper.
Dundee had the better of the opening exchanges, but Saints enjoyed a spell of pressure around the 25-minute mark, first when Jon McCracken was forced to tip wide Tony Gallacher‘s attempted lob after a route one ball from Mitov.
From the resultant corner, the ball broke to David Keltjens, who forced McCracken into another diving save with a curling 20-yarder.
Saints threatened again in the 35th minute when Sidibeh latched onto a ball over the top and picked out Clark with a cut back, but the returning hit man pulled his side-footed effort just wide of the far post.
Second half
Dundee worked the first chance of the second half when a surging Dodgson run, followed by a blocked Bakayoko shot, saw Tiffoney collect at the far post, only to hit the side netting.
But St Johnstone, as in the first half, found their footing and after Max Kucheriavyi forcced McCracken to tip over his shot-cum-cross, a succession of corners saw the Dark Blues forced to defend their box.
Sidibeh, set free on the left flank, found Clark with a cross just before the hour, but the striker’s header was straight at McCracken.
However, there was nothing the Dark Blues keeper could do mere minutes later when Sidibeh launched himself into the air to fire a Liam Gordon flick-on into the net with an acrobatic overhead kick to level the scores.
It was a stunning way for the Gambian striker to claim his first Saints goal – and reminiscent of a similar effort saved by Trevor Carson in the last game between the sides at Dens Park.
With the score equal, Saints looked the more likely side for a spell, but a smart Dundee move with 10 minutes to go unlocked the home side’s defence.
Keltjens and Smith looked static in the left back area and Luke McCowan took full advantage, surging into the Perth box and firing in a deadly low cross for Bakayoko to poke home from close range.
Again Saints seized the initiative and came close to a late equaliser when substitute Graham Carey struck the post with a 20-yard effort.
And then VAR struck again.
The Perth side had the ball in the net after a challenge between Ryan McGowan, Aaron Donnelly and McCracken, only for the referee to award a free-kick to Dundee for a foul on Donnelly.
Snedden was then referred to his monitor to check whether a legitimate goal for St Johnstone had in fact been scored.
Within a minute, his decision was made and Dundee were heading back along the A90 with three points tucked in their back pocket.
Saints remain one point ahead of relegation play-off rivals Ross County, who lost at Aberdeen.
Key man
Lyle Cameron has gone from strength to strength in recent weeks and he followed up his classy goal for Scotland U/21s with a wonderful lobbed finish to open the scoring here.
An open goal it may have been but, from 45 yards, it required real ability to take advantage of the situation. A classy performance all round.
Player ratings
St Johnstone: Mitov 5, McGowan 6, Gordon 7, Robinson 6, Keltjens 6, Kucheriavyi 6, Phillips 7, Smith 7, Gallacher 6 (Carey 83, 4), Sidibeh 7 (Kimpioka 77, 6), Clark 6 (May 83, 4).
Unused subs: Richards, Considine, Crawford, Franczak, Smith.
Dundee: McCracken 7, Portales 7, Shaughnessy 6, Donnelly 7, Dodgson 7 (Howley 78), Costelloe 6 (McGhee 62, 7), Sylla 8, Cameron 8 (Lamie 87), McCowan 7, Tiffoney 6 (Mellon 62, 6), Bakayoko 7.
Unused subs: Sharp, Astley, Robinson, Robertson, Boateng.
Conversation