Bafetimbi Gomis scores four goals to stun Dinamo Zagreb
Bafetimbi Gomis scored four goals in the space of 25 minutes as Lyon stunned Dinamo Zagreb 7-1 to qualify for the last 16 at Ajax's expense in Group D.
The French side went through on goal difference after Ajax were beaten 3-0 at home by group winners Real Madrid.
CSKA Moscow started the day bottom of Group B but advance after a fine 2-1 win at Inter Milan.
Napoli progressed at Manchester City's expense from Group A while Benfica finished top of Group C.
But it was in Croatia where the drama really unfolded as Gomis produced a stunning individual goalscoring display.
Lyon fell behind to 10-man Dinamo, who had midfielder Jerko Leko sent off for a second bookable foul, when Mateo Kovacic opened the scoring.
But French striker Gomis scored a hat-trick in seven minutes - shaving two minutes off Mike Newell's fastest Champions League treble for Blackburn in 1995 against Rosenborg.
Gomis equalised on the stroke of half-time before scoring three times in the second half. Maxime Gonalons, Lisandro Lopez and Jimmy Briand also netted for the visitors.
In the other game in Group D, Ajax lost 3-0 at home to Real, who finished the group with six wins out of six, after goals by Jose Callejon (2) and Gonzalo Higuain.
CSKA advanced thanks to Vasily Berezutski's late winner against Inter in the San Siro.
Going into the match needing a win and the Lille-Trabzonspor match to end in a draw in order to qualify, the defender headed home with four minutes to go, seconds after Diego Milito had headed against the crossbar at the other end.
The Russian side took the lead five minutes after the break through Ivorian striker Seydou Doumbia, but dreams of progression appeared to have evaporated when Argentine midfielder Esteban Cambiasso equalised within a minute.
With Lille and Trabzonspor ending goalless, CSKA qualified in second place with eight points from six games, two points behind Inter.
Napoli took until the 65th minute to score their opener against Villarreal, who finished without a point from their six group games. Gorkhan Inler scored the first and Marek Hamsik made it 2-0 late on.
While Manchester United are left to reflect on what might have been in Group C, Benfica finished top with 12 points from six games.
Oscar Cardozo scored the only goal of the game to sink Otelul Galati, who finish without a point in six games.