St Mirren took a huge step towards securing a European place for the first time in 37 years as they romped to a 3-1 away win over nearest challengers Dundee.

The Buddies opened up a 3-0 lead through goals from Alex Gogic, Scott Tanser and Toyosi Olusanya. Dundee, who could have leapfrogged their visitors into fifth place with a win, hit back through substitute Michael Mellon, but Stephen Robinson’s side held firm for a deserved victory.

Saints are now five points clear of the Dark Blues with just three games to play and they celebrated wildly with their supporters at full-time as they look forward to the likely prospect of playing in Europe for the first time since 1987.

Dundee made two changes to the side that lost 2-1 at home to Celtic as Aaron Donnelly and Lyall Cameron replaced Malachi Boateng and Josh Mulligan, while there was one alteration for the Buddies as Olusanya took over from Greg Kiltie in attack.

The visitors signalled their intent as they forced a flurry of early corners, with James Bolton sending a free header over from one of them.

Olusanya then fired a half-volley high over from 15 yards out as Saints continued to look the more assured side in the opening exchanges.

Dundee got forward with purpose for the first time when Lyall Cameron and Luke McCowan combined superbly to create an opening for the latter inside the box, but he was unable to get a clean connection on his shot and it ran harmlessly wide.

McCowan then broke away down the left and crossed for Jordan McGhee at the back post, but the right-back was unable to get enough power on his header to trouble Zach Hemming.

The visitors made the breakthrough in the 38th minute when Caolan Boyd-Munce’s free-kick from the right was cleared out to the left and Ryan Strain’s delivery back into the box broke off McGhee and into the path of the unmarked Gogic, who pounced to force the ball past Jon McCracken from just a couple of yards.

Dundee boss Tony Docherty responded to a poor first-half display from his side by replacing midfielder Mo Sylla with Boateng at the break and the Dark Blues made an encouraging start to the second period, with Cameron’s firm shot from 20 yards out well held by Hemming.

But Saints took the sting out of the hosts’ bid for a fightback in the 59th minute when left wing-back Tanser seized on a flick-on from Bolton and got himself free in the box all too easily before a thumping a low shot beyond the exposed McCracken from 10 yards.

The visitors stretched their lead further in the 72nd minute when Olusanya fired home from close ranger after good work by substitute Keanu Baccus and Mikael Mandron to set him up.

Mellon reduced Dundee’s arrears four minutes later when he nodded in from two yards, sparking a spell of late pressure from the hosts, but Saints stood firm to claim a huge victory in their pursuit of Europe.