Lille reached the knockout stages of the Champions League for the first time in their history in dramatic fashion as they beat AC Milan 2-0 in Italy.
Peter Odemwingie struck in the eighth minute to set the French side on their way before Kader Keita doubled the lead shortly after the hour mark.
Milan went into the game having already guaranteed themselves top spot in the group.
Claude Puel's side were made to sweat until the last minute as AEK Athens almost spoiled the party for them in the other group game.
However, the Greeks drew 2-2 at Anderlecht to give Lille a place in the last 16.
AEK's Champions League dream is over but their European season will continue with a place in the UEFA Cup after Lorenzo Serra Ferrer's team produced a battling display to come from two goals down to draw with Group H basement boys Anderlecht in a thrilling encounter in Brussels.
Goals from Anthony Vanden Borre and Nicolas Frutos had put Anderlecht firmly in control at the Constant Vanden Stock stadium until the 75th minute, when AEK substitute Vasilios Lakis headed home to claw the Greeks back into contention.
Italian defender Bruno Cirillo then levelled the scores five minutes later with a stunning volley to set up a thrilling finale.
With Lille winning in Milan, AEK needed a winner to seal second spot in the group but despite late pressure in a breathless final few minutes the Yellows failed to break through to get the victory they wanted.
Lyon and Steaua Bucharest added a point apiece to their Group E tallies in a meaningless final clash at Stade Gerland on Wednesday evening.
The match began brightly with Nicolae Dica giving the visitors a third-minute lead and Lyon hitting back straight away through Alou Diarra.
But the excitement dried up thereafter with Lyon already assured top spot in the pool and Steaua's third-place position and UEFA Cup berth also secure.
Also in Group E, two goals in the last four minutes earned a second-string Real Madrid a 2-2 draw against Dynamo Kiev.
A brace by Maxim Shatskikh had given the hosts a 2-0 lead within the first half-hour as they looked to claim a first victory in the pool, but another double by Ronaldo, the second a penalty earned runners-up Real a point.
A battling performance from Hamburg ensured CSKA Moscow had no hope of progressing to the last 16 as they lost 3-2 in Germany.
CSKA needed a victory, coupled with a result other than a draw between Porto and Arsenal, to remain in the competition.
But news from Portugal proved irrelevant as Hamburg twice came from behind to register their only points of the competition.
Ivica Olic's 23rd-minute penalty gave CSKA the lead but Besart Berisha levelled five minutes later.
CSKA were ahead again midway through the second half following Yuri Zhirkov's superb solo effort, but Rafael van der Vaart hit a second Hamburg equaliser.
Then, with seconds left, Boubacar Sanogo fired in from close range to give Thomas Doll a morale-boosting victory.
Hamburg's Timothee Atouba was sent off after being substituted in the 69th minute, having been seen to make gestures at the crowd.