Last updated on .From the section Football

Motherwell will require success in the play-offs if they are to secure their Premiership status for next season.

A stoppage-time Stephen Mallan goal gave already relegated St Mirren victory in their penultimate top-flight fixture for a year at least.

Substitute John Sutton had given Motherwell the lead with a penalty.

But a Jason Naismith effort came off Motherwell's Mark O'Brien before nestling in the net and Mallan's goal consigned Well to second bottom place.

Before the late goal, Motherwell had striker Scott McDonald controversially sent off for violent conduct after a challenge with Thomas Reilly.

Ian Baraclough's Well will face Hibernian, Queen of the South or Rangers over two legs in the Scottish Premiership play-off final.

St Mirren had the opening chance when Sean Kelly was left unmarked at the back post at Mallan's free-kick but the defender's shot from the edge of the six-yard box was wide.

A huge travelling away support had arrived in Paisley to get behind their side but despite their backing, Motherwell had an air of tension in their early play.

As the weather deteriorated into a rain and hale storm, Alan Gow burst clear of the Well defence and with only goalkeeper George Long to beat slotted past the post.

At the other end, McDonald and Marvin Johnson combined to set up set up Erwin but the big striker's shot was turned to safety by Kello.

Motherwell's target of having to match or better the results of Ross County and Kilmarnock seemed to be having an adverse impact on their play as they looked to take the battle to avoid the play off spot to the last week of the season.

James Dayton rattled a shot towards George Long's goal that the keeper saved and Erwin and then McDonald headed just wide for Motherwell.

Gow was carried off on a stretcher after being clattered by Stephen McManus, who was booked for the challenge.

St Mirren should have taken the lead when substitutes Lewis Morgan and Kieran Sadlier along with Dayton peppered the Motherwell goal with a series of shots in a frantic sequence. However, the visitors somehow managed to keep their goal intact.

And when Reilly was judged to have fouled Erwin inside the box Motherwell got the breakthrough from the penalty spot.

Sutton, only on the pitch seven minutes as a replacement for Marvin Johnson, scored from the 12-yard mark.

The lead was short lived as Naismith's effort combined with the inability of Long and O'Brien to keep the ball out saw the Paisley side pull level.

In the final minute of regulation time, McDonald was dismissed by referee Brian Colvin after he seemed to catch Reilly with his arm in an aerial challenge.

The drama did not end there and in the seventh minute of added time Mallan blasted home the winner from 25 yards.

St Mirren lost Gow to injury in the second half

Sutton's penalty put Motherwell ahead

Naismith (centre) levelled for St Mirren

Referee Colvin sent off McDonald late in the match

Mallan netted from distance for St Mirren's winner