A youthful Hearts side bounced back from Scott Robinson's sending-off to beat Inverness 5-4 on penalties and reach the League Cup final.
Inverness had taken the lead in the 49th minute when Andrew Shinnie finished off a move he had started himself, but Hearts fought back strongly and Michael Ngoo netted a debut goal 24 hours after signing on loan from Liverpool.
Robinson was sent off for a two-footed challenge in a full-blooded encounter that also saw nine players booked, but the Gorgie side held on for penalties and Inverness substitute Philip Roberts missed the final spot-kick to spark Hearts celebrations at Easter Road.
Both sides had opportunities to win the game before the 120 minutes were up but Inverness fans will rue a clearcut chance in extra-time when top goalscorer Billy McKay passed up an open goal as Caley Thistle suffered only their fourth defeat of the season.
Ngoo also hit the post with a first-half header and ensured he made an instant impact with an aggressive display in a much-changed Hearts team.
Hearts' starting team contained seven players aged 21 or under.
They began on the front foot, often playing the ball up to 6ft-plus Ngoo, who quickly showed he had no hesitation to use his powerful frame.
Left-back Danny Wilson had a shot turned past the near post by Antonio Reguero and Jamie Walker threw himself to the ground in the penalty box as he tried to get past two Inverness players and was fortunate not to be booked by Euan Norris.
Inverness were struggling to get forward but they had a great chance in the 14th minute when Andrew Shinnie sent McKay clean through after Caley Thistle had cleared a corner.
McKay had all the time he needed but Jamie MacDonald got down well to save his shot.
Ngoo was having a bruising tussle with Gary Warren and the pair were booked after a clash near the halfway line.
Inverness had settled down but Ngoo could not have come closer to getting off the mark in the 25th minute when he battled to meet a Wilson cross and got in a glancing header that came off the inside of the post and was cleared.
Graeme Shinnie's free-kick then caught the Hearts defence cold but McKay could only glance the ball beyond the far post. Hearts were grateful as Foran and Warren were waiting to pounce.
Inverness started the second half in the perfect manner when Andrew Shinnie's persistence paid off.
Shinnie had a shot blocked but he soon won it back from Andrew Driver and played it in for McKay.
The striker held off Marius Zaliukas and neither could collect the ball, which Shinnie ran on to and slotted just inside the far post.
Hearts levelled in the 66th minute when Webster headed Fraser Mullen's deep free-kick back into the six-yard box and Ngoo volleyed home with his left foot.
Robinson was shown a straight red card in the 77th minute for a two-footed challenge on Owain Tudur Jones.
The numerical advantage was not particularly apparent in the flow of the match though until Hearts sat in at the start of extra-time.
Yet Hearts winger Arvydas Novikovas had the first chance after being played over the top by fellow substitute Mehdi Taouil. David Raven managed to get a foot in as the Lithuanian shot from inside the box.
McKay passed up a glorious chance when Shane Sutherland's square pass presented him with an open goal.
The prolific forward opted to take a touch and then laid it off to Andrew Shinnie after Hearts got men back to cover, but the goalscorer's shot was blocked at close range by MacDonald.
Webster had a header cleared off the line and Andrew Shinnie stabbed the ball over, and the game drifted towards penalties with Hearts seemingly content to run the clock down.
Reguero was booked for delaying tactics immediately before Zaliukas scored the first penalty and there followed four more converted spot-kicks before McKay sent MacDonald the wrong way.
The successful conversions kept coming and Taouil made it 5-4 before Roberts was handed the first sudden-death pressure shot and blazed over the bar to send the Hearts fans wild.