Alex Lowry’s dramatic stoppage-time winner earned Hearts a Viaplay Cup semi-final place at the expense of Kilmarnock at Rugby Park.
Matty Kennedy went agonisingly close for the hosts before Jorge Grant stepped onto a well-weighted lay-off to sweep Hearts into a half-time lead.
Derek McInnes’ side showed great determination in the second 45 and converted their attacking intent into an equaliser as Brad Lyons’ forceful header beat Zander Clark.
But on-loan Lowry, who had only been on the pitch for a minute, shaped a low, curling shot into the bottom corner to win it in stoppage time.
The visitors recorded just their fifth victory in 12 games in all competitions this term, with the traveling support unfurling a banner criticising the club pre-match.
“I know we’ve been inconsistent – our performances are really good or flat – but I’m pleased we put on a performance,” said head coach Steven Naismith.
“Ultimately, I won trophies as player and I want to do it as a manager. I know how good it is. We’ll watch the games tomorrow and see how it plays out.”
After both sides suffered disappointing results at the weekend – Hearts losing and Kilmarnock conceding an injury-time equaliser – neither side seemed in a hurry to make amends.
Lawrence Shankland failed to convert two opportunities in the early stages prior to Kennedy’s run lighting up an otherwise dull opening.
Just as the half was petering out, Kye Rowles stepped into the final third as Hearts looked to recycle the ball following a failed attack.
He played a firm pass to the feet of Shankland, who cushioned it perfectly for Grant to step onto and curl into the bottom right corner.
A far more frenetic pace ensued after the interval with David Watson’s snapshot fizzed wide as players began to lunge into crunching tackles with a greater frequency than previously.
Kilmarnock passed up a glut of opportunities as Danny Armstrong and Robbie Deas both failed to show enough composure in front of goal and a swerving Kyle Magennis effort skidded wide.
Their pressure then told as Kennedy, who impressed throughout, squared up Toby Sibbick and stole a yard of space with a cute double stepover. His deflected cross fell for Lyons to power the header back across goal.
But as extra time loomed, Rangers loanee Lowry showed patience in the box to tame the ball and angle a shot away from Dennis.
Player of the match – Jorge Grant (Hearts)
Hearts find reason to be cheerful amid unrest – analysis
Kheredine Idessane, BBC Sport Scotland at Rugby Park
This has the feel of a big result for Hearts, having been on a bad run prior to this. They showed plenty of appetite for the fight, lots of energy and endeavour, and in Shankland had a real focal point up front.
The Hearts fans displayed protest banners before kick off but at full-time they hailed a hard-fought win at a venue where they have only won twice in their last 10 visits.
The fact the winner came so late from Lowry added to the visiting fans’ joy.
For Kilmarnock, there was nothing but disappointment and frustration. They couldn’t take their chances and the marquee defeat of Celtic in the last round now counts for nothing.
That’s now three games out of their last five that they’ve conceded a goal after the 90th minute.
What they said
Hearts head coach Steven Naismith: “The conditions were tricky but, overall, I thought we played really well.
“I’ve asked [Alex Lowry] to show moments of quality, not potential, and he comes up with an unbelievable moment.”
Kilmarnock manager Derek McInnes: “I thought we were terrific second half. We had four or five shots in the first five or six minutes of the second half and there was a real belief about us.
“We dragged the cup tie to where we needed it to be and we got a deserved equalise but we are guilty of naivety towards the end.
“It’s almost as if we were losing and had to throw caution to the wind but we didn’t. We’ve paid the ultimate price.”
Kilmarnock host St Mirren on Saturday (15:00) while Hearts travel to Dingwall to face Ross County at the same time. The Tynecastle side will discover their opponents in November’s semi-finals on Wednesday night.
- 5MayoSubstituted forDallasat 90+3′minutes
- 6DeasSubstituted forNdabaat 76′minutes
- 12WatsonSubstituted forCameronat 90+3′minutes
- 21SibbickBooked at 90mins
- 14DevlinSubstituted forHaringat 45′minutesBooked at 60mins
- 8NieuwenhofBooked at 88minsSubstituted forBaningimeat 90+1′minutes
- 77VargasSubstituted forLowryat 90+1′minutes
- 7GrantBooked at 50minsSubstituted forBoyceat 82′minutes
- 17ForrestSubstituted forOffiahat 73′minutes
- Steven McLean
Attempt blocked. Liam Boyce (Heart of Midlothian) right footed shot from more than 35 yards is blocked.
Match ends, Kilmarnock 1, Heart of Midlothian 2.
Attempt missed. Lawrence Shankland (Heart of Midlothian) right footed shot from the right side of the box is close, but misses to the right.
Second Half ends, Kilmarnock 1, Heart of Midlothian 2.
Toby Sibbick (Heart of Midlothian) is shown the yellow card.
Substitution, Kilmarnock. Andrew Dallas replaces Lewis Mayo.
Substitution, Kilmarnock. Innes Cameron replaces David Watson.
Goal! Kilmarnock 1, Heart of Midlothian 2. Alex Lowry (Heart of Midlothian) right footed shot from the centre of the box to the bottom right corner. Assisted by Liam Boyce.
Delay over. They are ready to continue.
Substitution, Heart of Midlothian. Beni Baningime replaces Calem Nieuwenhof because of an injury.
Substitution, Heart of Midlothian. Alex Lowry replaces Kenneth Vargas.
Delay in match because of an injury Calem Nieuwenhof (Heart of Midlothian).
Foul by Liam Boyce (Heart of Midlothian).
Corrie Ndaba (Kilmarnock) wins a free kick in the defensive half.
Calem Nieuwenhof (Heart of Midlothian) is shown the yellow card for a bad foul.
Foul by Calem Nieuwenhof (Heart of Midlothian).
Matthew Kennedy (Kilmarnock) wins a free kick on the right wing.
Liam Boyce (Heart of Midlothian) wins a free kick in the defensive half.
Foul by Brad Lyons (Kilmarnock).
Foul by Stephen Kingsley (Heart of Midlothian).
Heart of Midlothian