IT has been five long years since Hearts were at Hampden, a heck of a lot of a time to stew on what happened the last time they graced the national stadium. Finally, they may have their chance to exorcise the ghosts of their defeat to St Mirren in the 2013 final of this competition after eventually shaking off a spirited Motherwell side in a remarkable game at Tynecastle.

After playing in Mount Florida on no fewer than five occasions last season alone, the visitors clearly had the bug for it, and moved ahead on the night through a Curtis Main penalty, but an equaliser from Steven MacLean before a fiercely contested first-half was out and another from Peter Haring in a second period which Hearts dominated looked to have given Stephen Robinson his first knock-out cup defeat to a side other than Celtic.

From nowhere though, Motherwell hit back with a stunner from Ryan Bowman, but Olly Lee popped up at the death to finish off a fine sweeping move before Steven Naismith made sure on the break in stoppage time.

The margin of defeat was harsh on the visitors, but for Hearts, the dream start to the season continues as the locals skipped home with thoughts of silverware on their minds, sitting atop the Premiership and facing Celtic next month for a place in the first final of the campaign.

Whether it ends up being played at Hampden or Murrayfield due to their opponent’s European commitments was of little concern to a knackered Craig Levein at the end of a breathless night, and neither was the identity of their opponents. Like the 14,000-odd other giddy Jambos in attendance, he was just happy to be there.

“That was brilliant,” said Levein. “What a game of football. I loved it.

“I said to the boys at half-time: ‘I wish I was playing’. What a brilliant game, right from the beginning. It never let up. I’m just thrilled we managed to get through.

“We definitely deserved it. We missed a host of chances, good chances as well. But even the way the game transpired - going behind, having to come back, getting in front, being pegged back - was great character-building for the group.”

It was an evening that exhibited everything that is good about the Scottish game, and it was a shame there had to be a loser at all. A lot will be made of the fact that it was two wholly committed sets of players going toe-to-toe, but there was no shortage of quality on show either. It was everything you would want from a cup-tie and then some.

Hearts got off to a flyer and had two efforts cleared off the line in the opening minutes as Richard Tait and then Chris Cadden repelled headers from Naismith and Haring respectively from consecutive Lee corners.

The visitors were handed a golden chance to take the lead after just 11 minutes as a brilliant free-kick delivery from Gael Bigirimana found Liam Donnelly arriving at the back post to head the ball against the outstretched arm of Dunne. The Steelmen were denied a penalty at the weekend in an almost identical incident at Pittodrie, but this time referee Willie Collum pointed to the spot and Main stepped up to send Zdenek Zlamal the wrong way. It was his first goal since netting against Clyde in the group stages of this competition.

Hearts were handed a gift of their own to level though, as Bigirimana undid his earlier good work by dallying on the ball in his own area, being dispossessed by Callumn Morrison who centred for Naismith. The striker’s header back across goal found MacLean lurking at the opposite post to tuck home.

Hearts smelled blood, and were applying pressure relentlessly in the first 20 minutes of the second half, piling cross after cross into the Motherwell area. It looked to be a matter of time before they would make their dominance pay, and they duly did with 25 minutes remaining.

Motherwell were putting their bodies on the line, but after Mitchell’s effort was blocked, the ball fell to John Souttar who mishit his shot only for the ball to land perfectly for Haring to slide the ball home.

Just as the game seemed to be drifting away from Motherwell, they hit back in stunning fashion. A simple headed clearance from Donnelly set Bowman away, who strode onto the bouncing ball and smashed it into the top corner.

It was breathless stuff, but just as extra-time looked a certainty, the home side broke down the right, and Naismith picked out the perfect ball low across the area for Lee to sweep into the corner and send Tynecastle wild.

Motherwell pushed everyone forward in search of yet another equaliser, but they were caught out as the outstanding Haring’s long pass sent Naismith clear up the middle, and the forward kept his composure to finish the contest at long last.

“It was a good cup tie and we scored two cracking goals away from home; when you do that, you probably expect to come away with a result,” said Motherwell manager Robinson.

“We could potentially have had a second penalty when we were 1-0 up [for a Dunne push on Bowman] but the referee was never going to give that at Tynecastle, let’s be honest.

“We looked more like ourselves tonight and, if we keep playing like that, we’ll start to climb the table.”