David Raven's dramatic extra-time strike against Celtic took Inverness into their first William Hill Scottish Cup final with a 3-2 win as the Hoops' treble hopes ended in controversy.
Celtic defender Virgil van Dijk opened the scoring in the 18th minute with a wonderful free-kick but the Hoops were denied a stonewall penalty kick and a one-man advantage seconds before the break when Caley defender Josh Meekings prevented a Leigh Griffiths header going in with his arm a yard from goal.
To compound Celtic's outrage, their goalkeeper Craig Gordon was sent off early in the second half by referee Steven McLean for tripping Inverness striker Marley Watkins to concede a penalty, which Greg Tansey scored past replacement Lukasz Zaluska
Caley striker Edward Ofere's low drive in the 96th minute was cancelled out by Celtic substitute John Guidetti's free-kick but with four minutes remaining full-back Raven struck from close range to set up a May 30 meeting with Championship side Falkirk, leaving Celtic manager Ronny Deila and the Parkhead fans angry and distraught.
There was no sign of the mayhem to unfold in the early stages of the lunchtime kick-off.
Celtic started in a lethargic state but in the 13th minute, in their first real spell of pressure, midfielder Nir Bitton crashed a 20-yard drive off the crossbar.
Moments later, Inverness goalkeeper Ryan Esson, in for the injured Dean Brill, dived to deny Griffiths, back in the side at the expense of Guidetti after coming off the bench to score a hat-trick against Kilmarnock in midweek, and the Hoops were up and running.
Van Dijk's goal came after Caley stopper Gary Warren was booked for a foul on James Forrest 22 yards from goal.
The Dutchman beat the defensive wall with a wonderful shot, with the ball going in off the near post before he ran off in celebration.
Caley boss John Hughes signalled to his players from the sidelines to keep their concentration, fearful of losing a quick second.
In fact, Inverness had a chance to level in the 24th minute when the ball fell to Ofere eight yards out following a corner but he bounced his shot into the ground and high and wide.
Esson then made saves from skipper Scott Brown, booked earlier for a foul on Daniel Williams, midfielder Stefan Johansen and Kris Commons as the Parkhead side finished the half strongly.
However, there was still time for a huge moment of controversy after the Caley keeper made yet another save from Johansen.
Griffiths' header from the loose ball was blocked by the arm of Meekings a yard from goal, but it went unnoticed by McLean and even additional assistant referee Alan Muir, who was just yards away behind the goal, to the anger of the Hoops fans and players.
There was more uproar in the 54th minute when Gordon was sent packing by McLean after up-ending Watkins who, on a Caley break, had reached Adam Matthews pass-back before the Hoops goalkeeper.
After several minutes' delay while Zaluska got ready to come on for Forrest, he picked the ball out of the net from Tansey's spot-kick.
Understandably, 10-man Celtic began to tire and Inverness took control but the game required another 30 minutes, where the drama continued.
When Ofere drilled a shot low past Zaluska, after captain Graeme Shinnie's cross had fortuitously come off Watkins, it looked like it was going to be Caley's day.
However, Guidetti came on for Griffiths and restored parity with a 25-yard free-kick which fooled Esson, leaving Hampden breathless.
After the turnaround, Zaluska rushed from his goal to present Caley substitute Nick Ross with a chance which he blazed over the crossbar but with four minutes remaining, Raven squeezed the ball in from a tight angle after great work by Shinnie for an historic victory and while they took the acclaim of their supporters, the officials were booed off by the Celtic fans.