Cody Cooke says St Mirren are on a roll that could spare them the pain of relegation.

Striker Cooke climbed off the bench to fire a hat-trick as Oran Kearney’s side claimed a 3-2 win over Dundee at Dens Park on Saturday.

But the result was not enough to save the Buddies from finishing in the relegation play-off spot and they will now have to fight for their top-flight lives in this week’s Thursday-Sunday shoot out with Dundee United.

But having chalked up six games without defeat, Cooke believes his team are hitting form at the perfect time to beat the drop.

He said: “We’ve got mixed emotions. We were hoping to stay up automatically but that’s not been the case.

“However, the last six results show the momentum is with us. If we’d managed this earlier in the season we’d probably be much higher up.

“But that momentum is with us now and that will be key going into these two games with United.”

Defeat was not the way already-relegated Dundee wanted to bow out of the top division.

And there was further agony for Darren O’Dea as his final match before retiring in the summer ended in a red card after 19 minutes.

The Gazette: James McPake (in red) James McPake (in red)

The former Celtic and Republic of Ireland defender failed to control 16-year-old debutant Finlay Robertson’s pass and was forced to drag down Brad Lyons as the Saints forward burst through on goal.

O’Dea was treated to a standing ovation from the Dens faithful but caretaker boss James McPake was distraught to see the curtain come down on his friend’s career in such ignominious circumstances.

He said: “Darren didn’t deserve that for what he’s done for this club.

“I don’t mean that just for what he did on the pitch, he’s helped those young guys that played against St Mirren massively by coaching them.

“I’m devastated for him actually but I’ll accept it a bit too, because I think weeks ago the passage that led to his foul wouldn’t have happened.

“Darren wouldn’t have been on the ball there given how we were playing back then.

“If you look at the first 20 minutes, we were so comfortable, so threatening – everything that comes from what we worked on through the week.

“It was me who asked Finn to try and play out that way if we could. It’s football, it’s unpredictable.

“But I’m gutted for Darren as a friend as he deserved to go off with his head held high. He’ll recover though, he’s got a lot to offer football.”

Read all the latest from St Mirren