David Raven netted a late extra time winner as Caley Thistle reached a first ever Scottish Cup final with a 3-2 victory against 10-man Celtic in a dramatic semi-final.
Virgil van Dijk gave Celtic the lead with a sublime free kick after 18 minutes before the Hoops were denied a clear penalty when Josh Meekings handled on the line.
Things went from bad to worse for Celtic nine minutes after the restart when Craig Gordon was sent off for a last man challenge on Marley Watkins and Greg Tansey netted the penalty.
Inverness dominated the second half but were unable to produce a winner and the match proceeded to extra time.
Edward Ofere looked to have won it for Caley Jags with a sweetly-struck volley but Celtic substitute John Guidetti replied with a free kick that deceived Ryan Esson.
But Raven chose the perfect time to score his first goal of the season when he turned home a Graeme Shinnie cross in the 117th minute.
Inverness will now face Championship side Falkirk in the final on May 30.
Caley Thistle made only one change from the side that drew 1-1 with the Hoops at the Caledonian Stadium last weekend with Ryan Esson stepping in to replace the injured Dean Brill, who has been ruled out for the remainder of the season with a dislocated knee.
Leigh Griffiths returned for the Hoops after scoring a hat-trick after coming on as a substitute in Wednesday’s 4-1 win against Kilmarnock, with Swedish international John Guidetti dropping to the bench.
The Celts were without cup-tied Gary Mackay-Steven and Stuart Armstrong, while Anthony Stokes was suspended.
Celtic were inches away from taking the lead in the 13th minute when Nir Bitton’s venomous effort from 25 yards struck the upright with Esson well beaten.
But the Celts broke the deadlock with a stunning strike five minutes later.
Gary Warren was booked for bringing James Forrest’s rampaging run to a premature end and from the resulting set-piece van Dijk curled a majestic strike beyond Esson, which flew into the net with the aid of the post.
Caley Jags almost restored parity immediately when Warren headed a Tansey corner to Ofere but the Nigerian skewed his shot wide.
But fortune favoured Caley Thistle in first half injury time when Celtic were denied a clear penalty when Josh Meekings used his hand to prevent Griffiths heading the ball home from close range.
But the game changed dramatically in the 54th minute when Ryan Christie sent Marley Watkins through on goal and when he was brought down by Celtic goalkeeper Gordon referee Steven McLean had no option but to produce a red card and award Caley Thistle a penalty kick.
After a lengthy wait, Forrest made way for Hoops reserve goalkeeper Lukasz Zaluska but he was unable to prevent Tansey converting from the spot.
Inverness enjoyed the bulk of possession from then on but extra time was required to separate the teams.
Christie drew a spectacular save from Zaluska before Caley Thistle took the lead in the 96th minute.
Watkins steered a deep Shinnie cross into the path of Ofere who volleyed the ball beyond Zaluska to the delight of the Inverness support.
But that jubilation was short-lived as Guidetti equalised with a free kick that bounced over Esson.
Yet it was Caley Thistle who would have the final say when Shinnie slid the ball across goal for Raven to net the winner.