Jason Cummings' first-half strike gave Hibernian victory over Hearts in a thrilling William Hill Scottish Cup fifth-round replay at Easter Road which ended with the Hibs forward sent off as both sides finished with 10 men.
Cummings, who scored in the first encounter at Tynecastle when Hibs had come from two down to draw 2-2 with their Edinburgh rivals, scored from close range in the fourth minute and as a pulsating first-half unfolded he passed up a great chance to make it 2-0 while Hearts striker Abiola Dauda had the ball in the net only to see it ruled offside.
In a frenetic second-half, Hearts forward Juanma Delgado had the ball in the net for the Ladbrokes Premiership side only to see it ruled out.
Jambos defender Blazej Augustyn, booked in the first-half for a foul on Liam Henderson, then was shown a second yellow from referee John Beaton in the 75th minute for throwing the ball away at a Hibs free-kick, before Cummings - yellow-carded for his goal celebrations - joined him in some confusion moments later, apparently for kicking the ball away although it may have been for dissent.
Jason Cummings', second right, goal made the difference
Image credit: PA Sport
Hibs survived a late battering to set up a home tie against holders Inverness but it will be difficult for that tie to better this one for breathless drama.
Despite being in a lower league, Hibs went into the replay as favourites and by kick-off time Easter Road was packed to its 20,000-plus capacity which made for a cracking atmosphere.
There was just four minutes on the clock, and stragglers still taking their seats when, from close range, Cummings volleyed in a cross from the right by skipper David Gray to send three stands of home supporters into raptures.
Hearts tried to assert themselves but the Leithers were tenacious.
In the 11th minute, on-loan striker Anthony Stokes sliced open the Tynecastle defence and midfielder Henderson set up Cummings but with only Neil Alexander to beat he tried to round the keeper instead of shooting and saw the ball hooked away for a corner that came to nothing.
There was no let-up in tempo.
In the 20th minute Dauda had the ball in the net from a Callum Paterson cross but Jambos' celebrations ended when the flag went up.
Play raged from end to end with Alexander saving a low drive from Stokes after he had been set up by Cummings, before Paterson drove just wide from distance at the other end.
It was a more purposeful Hearts side which began the second-half but midfielder Miguel Pallardo, booked in the first-half for a foul on John McGinn, was lucky not to see yellow again from referee Beaton for another challenge on the same player.
After McGinn sent a left-footed volley from 25 yards wide of the target, Jambos head coach Robbie Neilson replaced Pallardo with Sam Nicholson.
In the 65th minute, as the Jambos pressed, Paterson's ball across the six-yard box was somehow missed by Juanma, who did have the ball in the net moments later from another Paterson cross but again, to Gorgie frustration, the flag was up.
The equaliser, however, looked imminent.
Hibs' attacking threat had diminished although Cummings broke free of the Hearts defence again only to send a weak shot straight at Alexander.
There was more drama when Augustyn was sent packing for his act of petulance and there was puzzlement of sorts when he was soon followed by Cummings.
When players re-focused on the job in hand, Hearts kept pushing for the leveller but even five added minutes could not help, as the Championship side held out, albeit substitute James Keatings missed a great chance in the final seconds.