St Johnstone battled back to earn a Scottish Premiership victory against Dundee after a dramatic finish to Simo Valakari's first game in charge.
The Finn had to wait 25 days from being named as Craig Levein's replacement to taking to the dugout after work permit issues, but his side made sure it was worth the wait with an impressive second-half display.
Nicky Clark scrambled home the winner in the 90th minute from just a yard out, before a six-minute delay as the officials checked the goal's validity.
Unable to draw the lines to check if Clark was offside because of a scrum of bodies, referee Kevin Clancy was called to the monitor and it was decided that the onfield decision of onside would stand.
Had the goal been ruled out, St Johnstone would have been awarded a penalty for handball by Simon Murray anyway, but it was a consolation they did not need.
Despite the drama it was a deserved turnaround for the Perth side, who had hauled themselves level through Graham Carey's curling strike from the edge of the box.
They had trailed to a bizarre goal scored by Murray after just 12 minutes, which came from a simple long ball by goalkeeper Trevor Carson.
It was misjudged by centre-back Jack Sanders and, as goalkeeper Ross Sinclair came out, Murray thumped the ball over him before skipping around and awkwardly nudging the ball home from two yards.
Dundee, though, were flat for the majority of the game and by the time Carey levelled things Saints had already roused themselves to become more of a threat.
The victory means St Johnstone have won back-to-back league wins for the first time in nearly two years and gets the Valakari era off to the perfect start as they leapfrog Dundee into sixth.