Kemar Roofe's dramatic extra-time goal sent Rangers into the Europa League semi-finals with a breathtaking 3-2 aggregate win over Braga at Ibrox with the visitors finishing with nine men.
Trailing 1-0 from the first leg of their quarter-final tie in Portugal last week, Gers captain James Tavernier levelled after just over a minute and Roofe soon had the ball in the net only for VAR to rule it out.
Roofe hit the bar before Braga defender Vitor Tormena was sent off in the 42nd minute for denying the Gers striker a goalscoring opportunity with Tavernier firing in the resulting penalty.
Giovanni van Bronckhorst's side should have killed off the tie in the second half but were stunned in the 83rd minute when David Carmo scored to level the tie at 2-2 and take it to extra-time where Roofe pounced to score in the 101st minute before substitute Iuri Medeiros was also sent packing.
There was as much relief as joy at the end of the 120 minutes but nevertheless it is the Light Blues' first European semi-final in 14 years and they face RB Leipzig after the German side overcame Atalanta on a 3-1 aggregate.
It was one of the most remarkable European nights Ibrox had witnessed.
Braga boss Carlos Carvalhal had promised to attack in Glasgow but his side had barely time to catch a breath before they found themselves behind and level in the tie.
Left-back Borna Barisic took a Ryan Kent pass and his cross from the left was flicked to the back post by midfielder Joe Aribo for the ever-alert Tavernier beat keeper Matheus with an angled drive from close range.
Ibrox was in uproar again less than three minutes later when Barisic crossed from the left for Roofe to head in but French referee Francois Letexier checked VAR and ruled it out for earlier handball by the Gers defender.
There was more drama in the 32nd minute when Tavernier's corner from the right was headed on by Aribo and Roofe hit the bar from a few yards out but just before the break the home side deservedly doubled their lead.
Calvin Bassey's raking pass sent Roofe racing clear of an open Braga rearguard and backtracking Tormena brought him tumbling to the ground. Referee Letexier pointed to the spot, dismissed the Braga defender and Tavernier despatched the penalty.
It was all going Rangers' way and the home side created and missed a couple of chances.
Defender Connor Goldson hit the outside of the post with a shot in the 63rd minute but the offside flag was up before Aaron Ramsey headed a Barisic cross over the bar.
Roofe had the ball in the net in the 69th minute with a delightful chip over Matheus but the offside flag was up again.
The ball crossed the Braga line again when Ramsey clashed with Matheus but a foul on the goalkeeper was the outcome on this occasion.
Ryan Jack and Ramsey were replaced by Scott Wright and Glen Kamara before Braga dramatically pulled a goal back to level the tie when Carmo glanced in a header from Medeiros' corner.
Then came 30 minutes of added time with Braga re-energised and sensing penalties might be an option but that changed when Roofe converted an Aribo cut-back, with more Ibrox cheers coming when Medeiros was sent off after picking up two yellow cards, the first for a foul on Barisic's replacement Leon Balogun, the second for dissent towards the referee.
Gers substitute Scott Arfield missed two glorious chances in the second half of extra-time to ease the pressure on the Govan side but ultimately it did not prove costly.
For your chance to win HOME tickets to Cinch SPFL matches each week across ALL FOUR divisions just enter our competition below. You can enter once each week to be in with a chance of winning. If the form isn't working (CLICK HERE)...Good Luck!