Villarreal 1 Rangers 1/Aggregate: 3-3, Villarreal win on away goals: For 45 hugely impressive minutes last night Rangers seemed likely to achieve the unthinkable, not least to those who have witnessed them stumble from crisis to crisis on the domestic front this season, but ultimately they succumbed to superior quality and departed from the Champions League on the away-goals rule.
A Peter Lovenkrands goal handed the Scottish champions a surprise early lead, but the Spaniards recovered their composure to move into the last eight.
Rodolfo Arrubarrena's strike was enough for Villarreal, who, like Glasgow Rangers, have underperformed in their own league.
History had been made for Scottish football before this tie's first leg, given that no club from the country had been past the group stages before this season.
Villarreal have claimed their team bus was targeted by some Rangers supporters outside the Madrigal Stadium. A window was smashed as the coach approached the stadium.
"One of the windows of the team coach was broken by the Rangers fans when the players were still on board," said a Villarreal spokesman. "It was a frightening experience for them, but, thankfully, no one was injured."
The Villarreal manager Manuel Pellegrini made the surprising decision to omit his captain Quique Alvarez from the starting line-up, and the central defender's absence was noticeable in the early stages, as Rangers took the initiative.
Thomas Buffel forced a smart save from Sebastian Viera after only six minutes, and the opening goal arrived six minutes later as Viera failed to hold on to his interception from Buffel's pass to Barry Ferguson.
Lovenkrands seized on the opportunity to guide the ball cooly into an unguarded net.
Uncharacteristically Alex McLeish danced with joy on the touchline, but his emotion was thoroughly understandable given the importance the Rangers manager has put on being able to compete in Europe, not least on a personal level.
It seemed highly probable, though, that Villarreal's inadequacies in every area of the pitch would not be replicated after the break and they drew level within four minutes of the restart.
Diego Forlan's cross from the right edge of the six-yard box eluded everyone, including his fellow forwards, but the left back Arrubarrena stepped forward to capitalise on static defending.
Rangers pressed hard to prolong their adventure, but without creating much in the way of meaningful opportunities, and Villarreal held firm with the sort of tenacity which has characterised their first season in the competition.
VILLARREAL: Viera, Javi Venta (Hector Font 46), Rodriguez, Pena, Arruabarrena, Senna, Tacchinardi, Josico, Riquelme (Calleja 85), Forlan, Jose Mari (Franco 45). Subs not used: Barbosa, Guayre, Quique Alvarez, Alcantara. Booked: Arruabarrena, Viera, Tacchinardi, Franco.
RANGERS: Waterreus, Hutton, Rodriguez, Kyrgiakos, Murray, Burke (Novo 87), Ferguson, Hemdani, Namouchi, Buffel (Kris Boyd 64), Lovenkrands. Subs not used: Klos, Ricksen, Bernard, Andrews, Gavin Rae. Booked: Murray, Hutton, Buffel.
Referee: A Hamer (Luxembourg).