IT was a quirk of a compelling, entertaining game that it took the scrappiest of goals to settle it.

St Mirren and Inverness Caledonian Thistle had traded two excellent goals and struck the crossbar five times between them when defender Marcus Fraser popped up in the 89th minute to stab in a shot from close range to settle a compelling tie.

That was tough on the Championship side who deserved at least a crack at extra-time but was roundly celebrated by the home team who now await the winner of today’s tie between Kilmarnock or Montrose, with a place in the Scottish Cup semi-finals at stake.

“It could have been a game that finished 5-4 in the end,” said St Mirren manager Jim Goodwin.

“But I’m delighted that we’re on the right side of the result. It’s another quarter-final to look forward to.

“We want to be consistently going far in cup competitions and we’re doing that now. We’ve given ourselves a great chance of getting back to Hampden which is the most important thing. If we go all the way nobody will care too much about this performance.”

Inverness had come into this tie on the back of an eight-game unbeaten run and caretaker boss Neil McCann felt his players were unlucky to end up on the wrong side of this result.

"I don't think we deserved to lose the game,” he said. “St Mirren may possibly argue that they deserved to shade it - I would argue the other way.

“I think, if anything, if it was going into extra-time, we were looking strong. I felt we were actually looking a wee bit fitter.”

It was something of a mystery that the teams had trooped up the tunnel at half-time without a goal being scored.

Inverness certainly had no semblance of an inferiority complex as the side from the lower division and created the better of the first-half chances

Only some terrific goalkeeping from Jak Alwnick denied them, the goalkeeper sprawling to make two terrific saves from Daniel Mackay before stretching to keep out Nikolay Todorov’s shot and then touching a Scott Allan lash on to the post.

St Mirren had opportunities of their own in a frantic opening period, most notably from the lively Dennis who had a pair of shots blocked and then saw another effort before the break deflected on to the crossbar.

The dam was broken early in the second half, with both teams trading goals within the opening five minutes

Inverness went in front, Todorov left unmarked at the back post to volley in Allan’s corner with the home defence posted missing.

Their joy was fleeting, though, with St Mirren drawing level through the excellent Dennis who unleashed a ferocious effort after being teed up by Jamie McGrath. 

The deciding moment arrived one minute before the end. Jon Obika struck the post with his shot, Brandon Mason fired over the loose ball and Fraser couldn’t miss from right in front of goal.