Last updated on .From the section Football

Danny Swanson gave St Johnstone an early lead with a superb strike

Danny Swanson's double and a thumping Brad McKay header saw St Johnstone reach the League Cup quarter-finals in a sensational encounter in Perth.

Swanson ran onto a squared free-kick to superbly side-foot home the opener from 20 yards into the top corner.

Callum Paterson headed home from close range before the right-back was bundled over by Tam Scobbie in the box and Jamie Walker dispatched the penalty.

But Swanson converted another spot-kick before Brad McKay's header won it.

Their reward is a trip to Pittodrie to face Aberdeen in the last eight next month.

Hearts opened fairly brightly with Connor Sammon striking the post, but a wonderful moment of technique broke the deadlock.

It seemed a free-kick would be fired into the box but it was cut back to Swanson instead, who finished sweetly from the edge of the box.

Callum Paterson levelled for Hearts and won the penalty that put them ahead

Hearts battled back without creating too many chances but the equaliser arrived when Robbie Muirhead's free-kick was parried, the ball was sent back into the area and Paterson showed great determination to head home.

Two minutes later Paterson was rashly bundled to the ground by Scobbie and Walker made no mistake from the spot for the second game running .

Liam Craig saw a first-time shot tipped over as Saints tried to get back on level terms, with Hearts looking dangerous going forward.

But it was Swanson who took advantage of a kind bounce when he broke into the box, only for Alim Ozturk to catch him and concede a penalty. Swanson sent Hearts keeper Jack Hamilton the wrong way.

The winner, 10 minutes from time, was emphatic with McKay showing real determination to get his head to Swanson's corner and it flashed past Hamilton for the winner.

St Johnstone manager Tommy Wright: "We showed a lot of spirit and character. I think we deserved it - we had more chances, and their goalkeeper had to make more saves then ours.

"In the second half it was about who wanted it more, and I think we did.

"We work hard on set-plays and when they come off it's brilliant. We have quality and maybe we don't produce it consistently enough, but when we don't we grind out results and that's the sign of a good side."

Hearts head coach Robbie Neilson: "We should have seen it out. With 20 minutes to go we're in total control. We didn't deal with a long ball, that was the turning point in the game.

"It's not acceptable; we have to deal with that, but we're still a very young team. We were hunting another goal and left ourselves open. The experience will come, but it's a tough one to take tonight."