Mathieu Valbuena's late winner sealed a stunning comeback from Marseille in a 3-2 win against Borussia Dortmund to book the French side's place in the last 16 of the Champions League.
OM looked to be heading for the Europa League as they trailed 2-0 to the Germans at half-time while Olympiacos - just a point behind Marseille at kick-off - were in the process of comfortably beating a below-par Arsenal 3-1 in Greece.
Jakub Blaszczykowski and Mats Hummels put Dortmund in front at the break but Loic Remy and Andre Ayew drew Marseille level before Valbuena snatched second place for his side in the most dramatic of circumstances.
Olympiacos - who must now settle for a place in the Europa League - led 2-0 through Rafik Djebbour and David Fuster but Yossi Benayoun reduced the deficit before Francois Modesto wrapped up victory for the hosts.
With qualification from Group G already assured, APOEL Nicosia fell to their first loss and handed eliminated opponents Shakhtar Donetsk their first win, with a 2-0 success for the Ukrainians in Cyprus.
Luiz Adriano and Evhen Seleznev scored in the second half for Shakhtar, but despite the defeat APOEL still progressed as group winners after Zenit St Petersburg battled out the goalless draw they required at FC Porto to join them in progressing.
With Group H already decided, reigning champions Barcelona strolled to a 4-0 win over BATE Borisov with two goals for Pedro including a second-half penalty, and a goal each for Sergi Roberto and Martin Montoya.
Europa League-bound Viktoria Plzen fought back for a dramatic 2-2 draw against runners-up AC Milan. Alexandre Pato and Robinho put the Italians in front before Plzen scored two in the last two minutes from David Bystron and Michal Duris.
Andre Villas-Boas' Chelsea claimed an emphatic 3-0 win over Valencia to march into the last 16 as winners of Group E. Villas-Boas' men had stared elimination in the face after losing their last match to Bayer Leverkusen but Didier Drogba settled nerves with a third-minute strike, and Ramires and Drogba again completed a superb win.
Chelsea's night got better with news that they had overtaken Leverkusen to claim top place in the group after Robin Dutt's men were surprisingly held to a 1-1 draw by Genk in Belgium. Eren Derdiyok's late strike helped the visitors avoid defeat after Jelle Vossen's first-half opener, but it left Leverkusen having to settle for second place.