Match ends, Rangers 1, Young Boys 1.
Rangers survived a late own goal and nerve-ridden finale to progress to the Europa League last 32 as group runners-up after a draw with Young Boys.
Steven Gerrard's men led Group G by a point before kick-off and - with Porto beating Feyenoord - needed a draw at Ibrox to guarantee qualification.
They were cruising through in top spot thanks to Alfredo Morelos' first-half finish, but the hosts were left hanging on as Borna Barisic stabbed into his own net before Ryan Jack was shown a second yellow card in stoppage time.
Rangers survived to secure European football beyond Christmas for the first time since 2010-11, and will be unseeded in Monday's draw.
Morelos' crucial strike saw him finish as the top scorer in the group stage with six goals.
Morelos makes the difference
Rangers, with wounds and emotions still raw from Sunday's League Cup final defeat by Celtic, used their Hampden misery as fuel for a turbo-charged start.
With the pitch bathed in smoke from Young Boys fans' flares, Gerrard's side snapped into tackles and attacked with ferocious intent.
Ryan Kent had the ball taken off his toe by a last-ditch Christopher Martins challenge as the winger shaped to shoot 12 yards out. Then Joe Aribo fizzed a low centre across goal that Morelos could not flick home from four yards. All this in the first two minutes.
Rangers were having joy time and again with raids down the right, where Young Boys were wide open and inviting trouble. The onslaught continued and, from a Barisic delivery on the opposite wing, Scott Arfield had a goal-bound deflected wide.
On the night the nation went to the polls, Morelos was the prime candidate to power his side through.
The Colombian, on a mission to make amends for his cup final penalty miss, was involved in everything - one moment having a low shot from Aribo's through ball smartly saved, the next tumbling and screaming for a penalty after Fredrik Sorensen appeared to clip his heel in the box.
Morelos was not be denied on the half hour as Young Boys fell behind to a self-inflicted opener. Their botched attempt to play out of defence presented Kent with the ball and he played in Morelos.
The Colombian charged through the feeble challenge of Sorensen and raced on to slot a low and precise finish past David von Ballmoos. Never mind the ballots, here was the top scorer of the entire group stage with six goals.
The lead could have been bigger before the break, with Aribo glancing wide from a delicious Barisic delivery. The only flicker of concern at the other end came with a Christian Fassnacht header that flew a yard too high.
Rangers looked ready to resume their domination after the restart. Morelos scampered down the right, with the laboured Sorensen left wheezing in his wake, before having a near-post drive parried behind by Von Ballmoos.
But the hosts were unable to maintain the incredible intensity and Fassnacht's header - superbly tipped over by Allan McGregor - was a sign of Young Boys' growing threat.
Panic began to spread through the Ibrox stands when Barisic's attempt to cut out a cross instead sent the ball trickling over McGregor's line.
Jack's second yellow quickly followed - the midfielder will now miss the first leg of the last-32 tie - but Gerrard's men stood strong and the full-time whistle was met with a raucous reception of joy and relief.
Man of the match - Alfredo Morelos
Rangers' talisman again delivered when it mattered most on the European stage. Unbowed by his latest Old Firm blank on Sunday, the Colombian pounced on poor defending to fire the goal that ultimately sent his side through.
- Rangers have progressed from the group stage of a European competition for the first time since the 2010-11 Europa League.
- This was only the second time in their last 18 home matches in all competitions that Rangers have failed to win (W16 D1 L1).
- In all competitions under Gerrard, striker Morelos has scored 56 goals - 35 more than any other player.
- Morelos has scored six goals in the Europa League this season - the joint-most a Rangers player has netted in a European campaign with Jim Forrest in the 1964/65 European Cup.
- 8JackBooked at 90mins
- 14KentSubstituted forOjoat 78'minutes
- 26von Ballmoos
- 35Martins PereiraSubstituted forMambimbiat 73'minutes
- 13Moumi NgamaleuSubstituted forSpielmannat 61'minutes
- 17AssaléBooked at 86mins
- 18NsameSubstituted forHoarauat 61'minutes
- Dr. Felix Brych
- Shots on Target
Second Half ends, Rangers 1, Young Boys 1.
Hand ball by Nicolas Bürgy (Young Boys).
Second yellow card to Ryan Jack (Rangers) for a bad foul.
Felix Mambimbi (Young Boys) wins a free kick in the defensive half.
Foul by Ryan Jack (Rangers).
Attempt saved. Marvin Spielmann (Young Boys) right footed shot from outside the box is saved in the centre of the goal.
Attempt saved. Sheyi Ojo (Rangers) left footed shot from outside the box is saved in the centre of the goal. Assisted by Scott Arfield.
Foul by Guillaume Hoarau (Young Boys).
Connor Goldson (Rangers) wins a free kick in the defensive half.
Own Goal by Borna Barisic, Rangers. Rangers 1, Young Boys 1.
Marvin Spielmann (Young Boys) wins a free kick in the defensive half.
Foul by Sheyi Ojo (Rangers).
Saidy Janko (Young Boys) wins a free kick in the attacking half.
Foul by Sheyi Ojo (Rangers).
Roger Assalé (Young Boys) is shown the yellow card for a bad foul.
Foul by Roger Assalé (Young Boys).
Glen Kamara (Rangers) wins a free kick in the defensive half.
Attempt missed. Ulisses García (Young Boys) left footed shot from outside the box is too high.
Substitution, Rangers. Sheyi Ojo replaces Ryan Kent.