Media caption,

Highlights: St Johnstone 1-0 Hamilton

Adama Sidibeh's late goal earned St Johnstone a battling victory against second-tier Hamilton Academical and a place in the Scottish Cup quarter-finals.

With less than four minutes left, Graham Carey tried his luck from 30 yards out and fellow substitute Sidibeh reacted quickly to guide a header into the opposite corner, leaving Hamilton goalkeeper Dean Lyness stranded.

The Championship side had lost their previous three matches, but started the game brightly with Nikolay Todorov twice coming close.

Saints should have led before half-time, but Makenzie Kirk and debutant midfielder Jonathan Svedberg both headed straight at Lyness.

After the break, Accies substitute Oli Shaw could not beat home goalkeeper Andy Fisher after being played clean through, with murmurs of discontent starting to come from the stands.

However, the home side gradually took control as the half progressed and only some last-ditch Hamilton defending kept Kirk out.

Then, just as extra-time looked inevitable, Sidibeh delivered the game's decisive moment, heading home to continue the hosts' recent resurgence - they have now won four games on the spin.

What they said

St Johnstone manager Simo Valakari: "Good that [Adama Sidibeh] got his goal after a long wait. He has been working so hard.

"Hamilton came with a game plan and didn't bend it at any minute. How we dealt with this tie was very good.

"We kept pushing and in the end we get our result. I had a good feeling because we did the right things."

Hamilton Academical manager John Rankin: "It's a cruel way to lose a game. Over the piece we defended well and our structure was good.

"It's a lucky deflection to go in and it's a sore one to lose. We had opportunities in the game. Oli makes the goalkeeper make a save - it's a big moment in the game.

"Things aren't quite falling for us but the effort of the players can't be in question."