Dundee lost their final home game of this troubled season but they certainly went down fighting against St Mirren.
The match may have been a dead rubber for the Dark Blues but the Buddies simply had to win if they had any chance of securing their Premiership safety.
Dundee took an early lead through Cammy Kerr but shortly after they were reduced to 10 men when Darren O’Dea – playing his last game before hanging up his boots – was sent off.
St Mirren then took control of the match in the second 45 with half-time sub Cody Cooke scoring twice before Scott Wright pulled one back for the home side.
Cooke then completed his hat-trick with Dundee down to nine men due to injury.
However, the result was rendered academic from a St Mirren point of view with Hamilton beating St Johnstone to confirm that the Buddies will meet Dundee United in the play-offs next week.
James McPake was in the home dug-out after being named caretaker boss following Jim McIntyre’s sacking last Sunday with former Dundee full-back Gary Irvine who is helping out with youth coaching at Dens, assisting him.
McPake made two changes from the team that won last week at Livingston with Jack Hamilton taking Seny Dieng’s place in goal and 16-year-old schoolboy midfielder Finn Robertson replacing Martin Woods – who was absent from the squad altogether – in midfield.
Kerr was named as skipper with Josh Meekings making his return on the bench after a long spell out following hip surgery.
St Mirren had the backing of a 2,321-strong boisterous support but they were silenced in the 15th minute when Dundee stormed into the lead.
Paul McGowan slid a pass into Kerr with the full-back lashing high past Buddies keeper Vaclav Hladky from 12 yards for only his second goal for the club.
However, it was disaster for O’Dea just five minutes later when he brought down St Mirren’s Brad Lyons as he looked to race clear on goal with referee Alan Muir deeming the offence worthy of a red card.
As the big Irish defender made his way off the pitch, the Dundee fans rose to give him a standing ovation.
The Buddies looked to make their one-man advantage count straight away and after a home attack broke down, they worked the ball forward to Kyle McAllister with Hamilton having to make a strong save down to his right to keep out the front man’s 20-yard shot.
St Mirren boss Oran Kearney brought on striker Cooke at half-time and he made his impact just seven minutes after the restart.
Paul McGinn pinged a cross in from the right with Cooke sending a header at the back post into the net despite Hamilton’s best efforts to keep it out.
Buddies skipper Stephen McGinn then hit a thunderous drive just past the post with the visitors’ tails up.
And they took the lead in the 58th minute when the ball broke kindly to Cooke who calmly slotted low past Hamilton from 16 yards.
Dundee were then reduced to nine men in the 73rd minute when Gensy Kusunga had to go off with McPake already having made all three substitutions.
Amazingly, just a minute later, the Dark Blues equalised with Ethan Robson playing a superb cross-field ball to sub Wright who drove a low shot into the far corner of Hladky’s net.
But there was another twist in the 76th minute with Cooke being presented with a chance in the Dundee box and he made no mistake, firing past Hamilton to complete his hat-trick and secure all three points for St Mirren.