A very late strike from Alfredo Morelos ensured Rangers progressed past the final hurdle to qualify for the group stage of the Europa League , on a night in which the on-field happenings were largely overshadowed by what was happening in the stands.
The game was stopped as the second half wore on due to the visiting supporters letting off a cluster of flares that smoked the stadium out and impeded the vision of those on the pitch and in the stands.
It didn't stop a number of Rangers stars from shining however and Steven Gerrard will be impressed with the resilience shown by his men in what was a job well done.
Morelos' goal sparked jubilant scenes around Ibrox and secured a hard-fought, yet richly deserved victory.
The Gers now look ahead to Friday's group stage draw and Sunday's Old Firm derby.

Here's how Record Sport 's Michael Gannon rated the Rangers players man-by-man,
Allan McGregor
Didn't have much to do but dealt with everything that came his way. 7
James Tavernier
Superb when bursting up the touchline and determined to drag his side forward at every opportunity. 7
Nikola Katic
Rock solid all night and has come on leaps and bounds from last season. Unlucky not to score with a header. 8

Connor Goldson
Cast iron at the back when Legia turned up the heat late on and played a leaders role. 8
Borna Barisic
The Croatian was targeted by Legia all night and was involved in a couple of hairy moments. Picked up a knock and was eventually replaced. 6
Ryan Jack
Outstanding. The midfielder has emerged as the main man at Gers and he made the side tick again. 8

Steven Davis
A classy display in a congested engine room. Worked from deep but kept possession and pressing all night. 7
Scott Arfield
Had to go looking for pockets of space as Legia sat deep but was cute with balls around the corner and involved in most attacking moves. 7
Sheyi Ojo
Struggled to get much joy out wide early on but came on to a game in the second half and was much more direct and took a few pops at goal. 7

Joe Aribo
Found it tough to find space to work but when he did it was positive for Gers. Carved out chances as the game wore on. 7
Alfredo Morelos
It looked like it wasn’t going to be his night after a couple of chances went begging but ended up the hero when Rangers needed him most. 9
Subs
Jon Flanagan: Added steel to the Gers backline. 5
Jordan Jones: Gave the side a late cutting edge. 4
Glen Kamara (for Ojo 90 2) Boldtered the side in stoppage tie. 2
Not used: Foderingham; Helander; Defoe; Kamara; Jones; Stewart.