Rangers have progressed to the Europa League semi-finals after beating Braga 3-2 on aggregate in the quarter-finals, following a 3-1 second-leg win at Ibrox on Thursday night.
James Tavernier scored twice in the first half to put the Gers ahead, but David Carmo headed home for the visitors in the final ten minutes to force the tie in extra time with the score 2-2 on aggregate.
Kemar Roofe then netted the winning goal for the hosts in the 101st minute to send the Scottish giants through to the last four, where they will face RB Leipzig who beat Atalanta BC 3-1 on aggregate over two legs.
Rangers got off to the perfect start in the first minute when a deflected cross from Borna Barisic from the left was flicked to the back post by Joe Aribo and was met by the outstretched Tavernier who fired the ball home from a tight angle to the put the hosts in front.
The Gers thought they had scored a second just three minutes later when Roofe headed home from close range, but VAR disallowed the goal after Barisic was deemed to have handled the ball before teeing up Roofe inside the six-yard box.
Roofe then missed a glorious chance in the 32nd minute when he rattled the crossbar with a close-range shot, but the Gers eventually scored a second on the stroke of half time.
A long ball over the top from Barisic played Roofe through on goal, and just as the striker encroached the penalty area, he was bundled over by Vitor Tormena, who was showed a straight red card for denying a clear goal-scoring opportunity.
Tavernier then stepped up to dispatch the resulting spot kick, placing the ball straight down the middle to put Rangers in front on aggregate at the break.
Giovanni van Bronckhorst's side continued to dominate in the second half, causing numerous problems in the final third with Braga struggling to get hold of the ball.
Roofe had a close-range header cleared off the line on the hour mark, and in the 69th minute, he thought that he had added a third for Rangers when he ran through on goal and chipped the goalkeeper, but the striker was denied once again by the officials as the offside flag was raised.
Rangers were on top and looked like scoring again but the hosts were wasteful in the final third, and that proved costly as Braga found the net with their first effort on target in the 82nd minute.
Braga centre-back David Carmo came up for a corner and directed a bullet header past Allan McGregor – who was making his 100th European appearance for the Gers – to level the tie on aggregate and sending both sides into extra time.
The Ibrox faithful were silenced momentarily, but the roof came off in the 11th minute of extra time when Roofe slotted the ball home from a few yards out, getting on the end of a well-worked move down the right flank between Glen Kamara and Aribo.
Braga's hopes of getting themselves back into the tie became much tougher when substitute Iuri Medeiros picked up two needless yellow cards in a matter of seconds in the 105th minute – the first for a mis-timed tackle and the second for dissent – reducing the visitors to nine men.
Substitute Scott Arfield produced a miss-of-the-season contender in the closing stages when he failed to put the ball into an empty net from just a few yards out, but fortunately for the hosts they managed to hold on to a famous European victory and book their place into the last four of the Europa League.
Rangers will travel to Germany to face Leipzig in the first leg of their semi-final tie on April 28, before hosting the second leg at Ibrox on May 5.