St Johnstone progressed to the last 16 of the Scottish Cup with a hard-fought win over Dundee.
Guy Melamed struck the only goal of the game just 20 minutes in at Dens Park.
But the Dark Blues saw a legitimate-looking Danny Mullen goal ruled out by the assistant referee’s flag before Zander Clark pushed Charlie Adam’s penalty onto the post.
Dundee boss James McPake was booked for his protests after Mullen’s chalked-off strike – and became embroiled in a heated discussion with referee Craig Napier on the pitch at full time.
The hosts threatened early on, with Adam and Declan McDaid firing in long range efforts.
But it was Saints who struck a blow when Stevie May latched onto a long ball out of defence and picked out Melamed in the box, who tucked a neat finish past Adam Legzdins.
In the aftermath, it became a tense affair.
Dundee came into the game in the second half, with Saints in uncharacteristically sloppy form.
Mullen had the ball in the net soon after the break, pouncing when Zander Clark appeared to drop a cross, but the linesman’s flag was up – and after consultation the referee awarded St Johnstone a free kick.
The Dark Blues had another golden opportunity when Clark rushed off his line and flattened Mullen in the box leaving whistler Napier with an easy penalty decision to make.
Having pointed to the spot, Adam stepped up, but Clark tipped his effort onto the post before gathering at the second attempt to deny Dundee what would have been a deserved equaliser.
Dundee: Legzdins, Fontaine, Kerr, Ashcroft (McGowan 68), Marshall, Byrne, McDaid, Adam (Afolabi 82), Mullen, McMullan, Anderson (Cummings 70).
St Johnstone: Clark, McCart, Kerr, Gordon, Rooney, Booth, Wotherspoon, McCann, Craig (Bryson 64), May (Middleton 78), Melamed (Kane 65).