Lee Ashcroft returned to Rugby Park to haunt Kilmarnock as his crucial strike sank their 28-year top-flight run and restored Dundee to the Scottish Premiership.
The former Killie defender found himself cut loose by ex-boss Lee Clark despite helping the Ayrshire side beat the drop back in 2016.
But it was his goal which sealed the fate of Tommy Wright’s team as the Ayrshiremen found themselves plunged back down to the second tier for the first time since 1993 after a 4-2 aggregate defeat in the play-off final.
Trailing 2-1 from Thursday’s opener at Dens, Killie were desperate for a positive start as they sought to turn the tie around.
But instead they found themselves two down inside 12 minutes as Danny Mullen and Ashcroft put James McPake’s men within touching distance of promotion.
Kyle Lafferty pulled one back from the penalty spot midway through the second half but it was nowhere near enough to deny Dundee their ticket back to the Premiership two years after being relegated.
While Dundee become just the third Championship side to upset the odds and clinch promotion through the end-of-season shoot-out with back-to-back 2-1 wins, Wright’s future at Rugby Park now looks uncertain.
The former Scottish Cup-winning St Johnstone boss has another year left on his contract but it remains to be seen if he has the desire to stay on next season and lead Killie’s bid to escape the lower leagues.
Killie’s last brush with the play-offs saw Clark’s side survive thanks to a 4-0 second-leg romp over Falkirk back in 2016.
But it was Dundee who ran riot early on to put the tie beyond doubt.
The 500 home fans granted access to the East Stand burst to their feet in loud applause as they won the game’s first corner five minutes in.
But 90 seconds later they were silenced as Mullen put Dundee 3-1 ahead on aggregate.
Ross Millen’s aimless throw-in was booted upfield by Charlie Adam. But instead of dealing with it, Brandon Haunstrup – whose late Dens strike had handed Kilmarnock a lifeline – headed straight against Mullen.
He compounded his error by retreating backwards and Paul McMullan was left unchallenged as he drove forward to slip in Mullen for the precious opener.
Wright was brought in by Rugby Park chief Billy Bowie back in February to solve the Ayrshiremen’s chronic lack of goals and their open-door policy at the back.
But only two of the six Premiership clean sheets Killie have recorded this season have come under the Northern Irishman’s watch and those defensive frailties were glaring again as they fell further behind in the 12th minute.
Not for the first time, centre-backs Kirk Broadfoot and Zeno Rossi got in each other’s way as Paul McGowan sent over a corner, leaving Ashcroft to put another nail in his old side’s coffin.
Wright knew he had to roll the dice, so he sacrificed Haunstrup for Danny Whitehall as he gambled on leaving three at the back.
But that just left McMullan space to surge down the right and throw over a cross which Jordan McGhee came agonisingly close to converting as his angled header looped onto the bar.
When Chris Burke failed to convert Mitch Pinnock’s ball to the back post just before the break, the furious home fans let rip.
Adam also felt the wrath of his team-mate McGowan midway through the second half after the Dundee ace tried one of his trademark attempts from halfway when he had the option to release Mullen.
Killie were huffing and puffing with little luck, with Dundee’s defence eating up their long-ball approach.
But Lafferty did get on the scoresheet with 21 minutes left as Dee keeper Adam Legzdins brought down Rory McKenzie in the box. Lafferty rammed the spot-kick down the middle to give the hosts faint hope.
There was no fairy tale finish, however, as Dundee’s players roared with delight at the final whistle.