Olympiacos forward Javier Saviola scored twice in a 3-1 victory over Anderlecht, who finished with eight men, as the hosts reached the Champions League last 16 at Benfica's expense in Group C despite missing two penalties.
The win puts Olympiacos in the knockout phase for the first time since 2010, having finished in second place level on 10 points with Benfica but with a better head-to-head record.
The Portuguese side failed to progress despite a 2-1 success over group winners Paris St Germain, who have 13 points, and drop into the Europa League. Anderlecht were last on one point.
Argentine forward Saviola opened the scoring after 33 minutes with a clinical finish but Olympiacos were punished on the counter after losing concentration when Sacha Kljestan finished off a flowing move to level for the Belgians.
Veteran Saviola, 32, had a penalty saved at the start of the second half after Anderlecht defender Cheikhou Kouyate was dismissed for collecting a second yellow card for a handball but the striker then scored from close range for his second goal.
There was late drama as Anderlecht's Fabrice N'Sakala and goalkeeper Silvio Proto, who saved twice from the penalty spot, were sent off for picking up two yellow cards.
Vladimir Weiss had also been denied by Proto before Alejandro Dominguez succeeded with the home side's third spot-kick to complete the scoring in added time.
Michel's Olympiacos team began the match on the attack with Michael Olaitan providing a threat with his direct running in the absence of injured leading scorer Kostas Mitroglou.
Paulo Machado had the first effort on target for the hosts with a curling free kick that was turned around the post by Proto.
Chances were at a premium but Olympiacos made their possession count when Saviola pounced to score.
The Argentine, who had curled a shot just wide moments earlier, latched on to David Fuster's deflected shot which fell kindly for him to bury a low drive past Proto.
Anderlecht were level six minutes later after executing a classic counter down the left following an Olympiacos corner.
It culminated in Dennis Praet's unselfish pass to American Sacha Kljestan, who slotted into an empty net from close range.
Olympiacos were presented with a golden chance to reclaim the lead when they were awarded a penalty for Kouyate's handball only for Saviola to see his weak effort saved by Proto.
Saviola made no mistake in the 58th minute though, stretching to prod Fuster's miss-hit shot into the top corner to put the Reds ahead for the second time in the match.
Substitute Weiss became the second Olympiacos player to miss from the penalty spot with 18 minutes left with the Slovakian also denied by Proto, who then showed brilliant reflexes to palm away Olaitan's goal-bound effort moments later.
N'Sakala and Proto were both sent off for late lunges, the latter resulting in a third penalty which Dominguez converted deep into added time to wrap up the victory.