Chelsea stunned, Arsenal finish top
Chelsea were beaten 2-1 by Bayer Leverkusen after a last-minute header means they must wait to qualify from the Champions League.
For the third time on their travels in Group E, the Blues took the lead, Didier Drogba scoring his second goal of the season shortly after half-time.
But, as against Valencia and Genk, the visitors threw away victory, Eren Derdiyok equalising before Manuel Friedrich completed the comeback in stoppage-time.
Valencia will face the Blues in their final group game with a place in the last-16 at stake after a 7-0 thrashing of Genk.
Jonas scored a 10th-minute opener and Roberto Soldado's first-half hat-trick finished the job before the 40th minute. Goals from Pablo Hernandez, Aritz Aduriz and Tino Costa then turned it into a rout in the second half.
Arsenal qualified for the Champions League knockout stages for the 12th consecutive season after Robin van Persie's double gave the Gunners a 2-1 victory over Borussia Dortmund at the Emirates Stadium.
Van Persie took his 2011 goal tally to 33 in 30 matches by heading home Alex Song's cross, following a great run from the midfielder, before adding a second from close range four minutes from time after Thomas Vermaelen's flick-on.
A win seemed unlikely for the home side after Dortmund dominated the first half, but they faded in the second period before pulling one back in injury time through Shinji Kagawa.
Ioannis Fetfatzidis scored the only goal as Olympiakos overcame Marseille 1-0 at the Stade Velodrome.
The substitute scored seven minutes after he stepped foot on the pitch to give his side a potential lifeline to reach the knockout stages. The result leaves Marseille second in the group, four points behind Arsenal.
Barcelona secured top spot in Group H after leading AC Milan three times to win 3-2 at the San Siro.
The Italians equalised twice through Zlatan Ibrahimovic and Kevin-Prince Boateng after Barca had twice led through Mark van Bommel's own goal and Lionel Messi's 31st-minute penalty. But Pep Guardiola's side wrapped up a commendable win through Xavi's finish just after the hour mark as Barca, who like Milan had already qualified for the last-16, ensured top spot with a game to spare.
Czech side Plzen leapfrogged BATE Borisov into third place with a 1-0 win putting them one step closer to claiming a place in the Europa League. Marek Bakos' goal just before half-time proved to be the difference in a match which was shrouded in fog at the Dinamo Stadion in Minsk.
APOEL Nicosia became the first Cypriot side to qualify for the knockout stages as they dug in for a goalless draw at Zenit St Petersburg.
The visitors came under intense pressure at a freezing Petrovski Stadion, barely registering a shot on goal as they set out for a point, but clung on to remain top of Group G.
Zenit could face punishment from UEFA for an incident in the second half which saw referee Felix Brych take the players from the field because of smoke from a flare in the stands.
Porto snatched a 2-0 victory at Shakhtar Donetsk to set up a shoot-out with Zenit St Petersburg for a place in the last 16. The hosts twice hit the woodwork before being undone by Hulk's strike 11 minutes from time. Razvan Rat's stoppage-time own goal added insult to injury.
It meant any hopes of Shakhtar reaching even the Europa League disappeared, while Porto will need to beat Zenit at home to claim the second qualification spot.