Motherwell revived their top-six hopes with a first cinch Premiership win since Boxing Day as St Mirren boss Stephen Robinson suffered a 4-2 defeat on his Fir Park return.
Connor Shields scored a double as Well came from behind to jump to fifth in the table with a trip to Livingston to come before the split.
Former Motherwell manager Robinson has now lost six of his seven games in charge of the Buddies and their top-six hopes could be over before they host Rangers next Sunday. They fell to 10th and are now only six points above St Johnstone.
Both sides really needed a win to kick-start their ailing top-six ambitions and the first half was littered with sloppy defending.
Eamonn Brophy put the visitors in front before two goals in a minute from Sean Goss and Shields turned the game. Conor McCarthy levelled before Dean Cornelius regained the lead for Motherwell in the 45th minute.
Shields clinched the win in the 78th minute following some magnificent play from Kevin van Veen.
Motherwell manager Graham Alexander brought Callum Slattery and Goss back into his midfield and reverted to a 4-3-3 formation with Stephen O’Donnell starting at left-back. St Mirren had Jordan Jones back from injury but Greg Kiltie missed out.
Dean Lyness was in goal for Saints following Jak Alnwick’s red card last time out and he had an early scare after being dispossessed by Van Veen, but Goss saw his effort blocked.
The opener came in the 14th minute when St Mirren broke down the left. Sondre Solholm and O’Donnell collided as they tried to deal with Connor Ronan’s cross and Brophy slotted home.
Motherwell were level six minutes later after the simplest of moves paid dividends. Shields ran on to a throw-in down the right wing and pulled the ball back for Goss to sweep home a shot which was not particularly well hit but Lyness could not keep out.
The hosts were soon ahead when Joe Shaughnessy was caught out by Van Veen’s header on. Shields sprinted through and dinked a wonderful finish over the goalkeeper.
The chances kept coming. Brophy turned Ricki Lamie but hit the inside of the post and Lyness saved from O’Donnell after some more slack defending.
Saints levelled in the 38th minute when Liam Kelly got caught underneath Jones’ inswinging corner and McCarthy knocked home at the far post. The Motherwell goalkeeper claimed he had been impeded by Brophy but there was hardly anything in it.
Kelly soon saved from Marcus Fraser before Motherwell went back in front. Joe Efford pulled the ball back from near the corner flag and Cornelius picked his spot from 16 yards.
The interval did little to calm matters down. Solholm cleared after Jones was set up in space within a minute of the restart and Lyness soon pulled off a brilliant save to push Slattery’s powerful long-range volley on to the bar. Efford failed to make the most of the rebound.
Brophy and Henderson threatened an equaliser but Motherwell found some decent control of the game and Van Veen manufactured a goal from nothing after collecting the ball on the left flank near the halfway line.
The Dutchman nutmegged Fraser, charged into the box, ghosted past McCarthy and delivered a cutback which Shields ultimately knocked in.
Van Veen missed a glorious chance in the final minute but it did nothing to dampen the home fans’ long-awaited celebration of three points.
Follow STV News on WhatsApp
Scan the QR code on your mobile device for all the latest news from around the country