A youthful Hearts side bounced back from Scott Robinson's sending-off to beat Inverness 5-4 on penalties and reach the Scottish Communities 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.
Inverness were struggling to get forward early on but they had a great chance in the 14th minute when Andrew Shinnie sent McKay clean through but Jamie MacDonald saved well.
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.
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 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 from 15 yards.
Inverness were defending well but Hearts levelled in the 66th minute when Andy 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 midfielder looked distraught and pointed to his instep before being prompted to leave the field by the referee.
McKay passed up a glorious chance in the dying seconds of the first extra-time period 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.
Inverness keeper Antonio Reguero was booked for delaying tactics immediately before Zaliukas scored the first penalty and there followed four more converted spot-kicks before McKay, no doubt under pressure following his misses, sent MacDonald the wrong way.
The successful conversions kept coming and Mehdi 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.