Legia Warsaw secured a place in the Europa League at the expense of 10-man Sporting Lisbon after a 1-0 Champions League Group F win at the Polish Army Stadium.
Both teams were already out of the Champions League but the Portuguese side needed just a draw to progress to the second-tier tournament but Marques Guilherme's strike ensured it was Legia who advanced.
Sporting made the brighter start and William Carvalho dragged a pair of shots narrowly wide inside the opening three minutes before Adrien Silva curled a free-kick over the wall that was easily gathered by Legia goalkeeper Arkadiusz Malarz.
Aleksandar Prijovic was then presented with a golden opportunity when a headed clearance from midfield sent him clear of the defence in the 26th minute but he shot into the side-netting.
However, Legia were ahead three minutes later when Prijovic pulled the ball back to Guilherme and he fired past Pedro Rui Patricio into the bottom right-hand corner of the net.
Vadis Odjidja-Ofoe then hooked a shot wide as Legia began to dictate the game before at the other end Bas Dost sent a free-kick over the bar.
Dost and Sebastian Coates tested Malarz after the break as the visitors had a spell of dominance of their own.
They were then reduced to 10 men five minutes from the end when Carvalho picked up his second booking within three minutes for hauling down Odjidja-Ofoe as he burst through from midfield.