Last updated on .From the section Scottish Premiership

St Mirren moved off the bottom of the Scottish Premiership table as a late Sam Foley strike carved out a dramatic win over Ross County.

Brian Graham's shot on the edge of the box claimed the lead for the Highland side midway through the first half.

St Mirren then equalised just before the break through central defender Sean McLoughlin's close-range shot.

Just when a draw looked inevitable, Foley fired home from just inside the box to claim all three points.

The results moves St Mirren up to 10th, level on points with Hamilton who play on Sunday.

St Mirren deserving of late winner

Foley's wonderful strike was a worthy match-winner and thoroughly deserved for St Mirren's second-half endeavours.

The home fans could have been forgiven for assuming the winning goal would not come given their failings in front of goal this season, which threatened to continue this afternoon.

However, their persistence finally paid off as Tony Andreu burst forward before playing the ball into the path of Foley who lashed an unstoppable shot past Nathan Baxter.

While their woes in front of goal had hampered them all season, a mean defence has made them a difficult proposition to overcome at home.

Indeed, only Rangers had done that this season in the league - Borna Barisic's winner the only goal they had conceded here prior to Graham's stabbed opener.

The home side had started slightly the more enterprising of the two but when Graham and Billy McKay linked up on the edge of the box, the end result was County moving in front as the former poked the ball past Vaclav Hladky from 18 yards.

At that point you began to fear for a St Mirren side that had only scored seven in their 12 league games. The goal seemed to knock the stuffing out of them for a period.

But after Hladky had saved well from McKay, St Mirren did manage to draw themselves level just before the break.

It looked like Ryan Flynn was fouled in the box but referee Euan Anderson was smart enough to delay his whistle, which allowed McLoughlin to roll into the net.

If the first half was finely balanced, the second was a different story, with County largely on the back foot. But until Foley's wonder strike, St Mirren were profligate on a number of occasions when in good positions.

A lack of composure, perhaps borne of a shortage of confidence, plagued them as Jon Obika, Danny Mullen and Ilkay Durmus all passed up really presentable opportunities.

But just as it looked as though they would have to settle for a point, up popped Foley with the winner.

St Mirren have the joint-best home defensive record in the league

Man of the match - Ryan Flynn

Starting wide on the left before switching to the opposite flank, Flynn caused problems for both County full-backs.

More often used as a central midfielder in recent times, he rolled back the years to cause havoc and create chances from either flank.

It looked as though his efforts would be in vain but he and his team-mates will surely take confidence from another good result at home to move off the bottom of the table.

'We got what we deserved after poor second half' - reaction

St Mirren manager Jim Goodwin: "I think we did deserve to win it based on the overall game. In the second half, for large spells of the game, we were camped in Ross County's half. Going a goal behind and then showing the character to come back and win the game is a fantastic and really important result for us. Today was a big game and a draw wouldn't have been enough for us."

Ross County co-manager Steven Ferguson: "I'm certainly not going to sit here and say we deserved to win the game on our second half performance. We took the lead through a good goal from Brian Graham, then we went in to the game at one each and you're still thiking it's game on. What we were looking for was a better performance in the second half than we got. We probably got what we deserved in the end."