Close to a third for Accies as Marios Ogkmpoe takes a lovely touch and turns to fire in a low shot but it's straight at Zander Clark.
Nearly there... We're into four minutes of stoppage time and the home fans are in good voice.
Dolly Menga bends a drive just wide from the edge of the box as Livingston come close to hauling themselves level after being 3-0 down.
The home fans are beginning to relax, with a few songs breaking out as the game kind of fizzles out.
St Johnstone don't look like they are going to grab a couple of late goals.
And another! It's game on now as Livingston sub Scott Tiffoney completes a quickfire double with a lovely angled finish after skinning David Devine inside the box. Can Motherwell hold on?Copyright: BBC
Livingston substitute Scott Tiffoney bundles home the rebound from a couple of yards after Lee Miller's header is well saved by Mark Gillespie.Copyright: BBC
And just like that, the Buddies are back in front.
Ryan Flynn goes on a fine run into the Dee box and Cody Cooke takes a shot that somehow beats Jack Hamilton. The keeper will not be pleased with his effort there.
Dundee are down to nine players, with Genseric Kusunga pulling up with a hamstring issue and all three subs already used.Copyright: BBC
Dundee level it up on Tayside as Ethan Robson plays a delightful cross-field ball to Scott Wright, who composes himself and drills the ball beyond Vaclav Hladky.Copyright: BBC
Blair Alston is on for St Johnstone, taking over from Ross Callachan. Alston has been offered a new deal but that remains unsigned. Is this his Saints farewell?
Joe Shaughnessy, on the bench in recent weeks, definitely appears to be heading for pastures new this summer.
Former Rangers & Hamilton midfielder on SportsoundQuote Message: St Mirren had to win up there, Dundee going down to 10-men. If they didn't they'd only have themselves to blame but now it's a real tough, tough ask for St Johnstone to get back in this game. Surely Hamilton Accies have enough in them to see this through
Has Steve Davies' strike secured Hamilton's top-flight place for next term?Copyright: SNS
- Copyright: SNS
St Mirren's celebrations were mixed with news of Hamilton doubling their lead. The Paisley side remain in the relegation play-off as it stands.
They need a big favour from St Johnstone now.
The Saints defence is posted missing as Lennard Sowah rakes a fine pass into the feet of Tony Andreu. The on-loan playmaker has loads of time to get his head up and have a shot but his effort sails over from 22 yards.
After the frenzied first half it's a fairly tame start to the second as Livingston try to spark a comeback. Lions striker Ryan Hardie hooks a shot over his shoulder and over the bar but Motherwell still pose plenty of danger with their pacy forwards.
Another goal from Cody Cooke has turned this match around. Ryan Flynn has an effort blocked by Ryan McGowan but Cooke is on hand to pass a right-foot effort into the bottom corner.
The Buddies are doing their bit, but with Hamilton 2-0 up against St Johnstone, the play-off still looms large.Copyright: BBC
It's a lot louder now as Steven Davies powers in a shot from the edge of the box.
Saints defenders Brian Easton and Jason Kerr get themselves in a fankle and the big striker is on hand to slam the ball in first time.Copyright: BBC
Of course, Accies remain safe as things stand but it's gone a wee bit quieter at the Hope Stadium after news of that goal up at Dens Park.
The Buddies are back in it. Half Time substitute Cody Cooke nets a fine back post header after great work on the right from Paul McGinn and Ryan Flynn.
Game on.Copyright: BBC
Scott McMann has time to pick his spot from just inside the penalty area after a neat Hamilton move but the full-back's shot is tame and straight at Zander Clark.
St Mirren players howl for a penalty at the start of the second-half but referee Alan Muir shows no interest as the ball cannons off Ethan Robson in the box. Looks like the ref got that one right.