Barcelona, Inter Milan, Stuttgart and Olympiakos advanced in the Champions League on Wednesday to complete the lineup for the next round.
Defending champion Barcelona needed an 86th-minute free kick by Lionel Messi to win 2-1 at Dynamo Kiev and edge Inter for first place in Group F.
Inter beat Russias Rubin Kazan 2-0 to advance, while Stuttgart took second place in Group G with a 3-1 win over Unirea Urziceni. Olympiakos beat already qualified Arsenal 1-0 to finish second to the Gunners in Group H.
Barcelona needed only to avoid a large defeat to advance and that looked possible when Artem Milevskiy scored an early goal for Dynamo, but Xavi Hernandez equalized in the 33rd after sustained pressure and European player of the year Messi made sure Barcelona qualified in first place ahead of Inter with his curling free kick.
Samuel Etoo and Mario Balotelli scored either side of halftime to give Inter Milan a 2-0 win over Rubin Kazan. Etoo opened the scoring in the 30th after being set up by an exchange between Javier Zanetti and Balotelli, before the latter scored a long-range free kick in the 63rd.
Inter finished second in Group F with nine points, two behind Barcelona, leaving Rubin Kazan to drop into the Europa League as the third-place finisher.
Stuttgart secured second place behind Sevilla in Group G with victory in its first game under coach Christian Gross.
Ciprian Marica, Christian Traesch and Pavel Pogrebnyak scored inside the first 11 minutes to stun the Romanian team, which went into the match with a two-point lead over Stuttgart in Group G. Antonio Semedo pulled one back for Unirea in the 46th.
Sevilla had already qualified before beating Rangers 1-0.
Olympiakos advanced to the knockout stage through Leonardos second-half goal against Arsenal, which lost its unbeaten record but still topped Group H.
Standard Liege qualified for the Europa League in dramatic circumstances when goalkeeper Sinan Bolat scored an injury-time header to earn a 1-1 draw with AZ Alkmaar.
With Standards European campaign seconds from ending, Bolat sprinted forward for a last-second free kick and headed powerfully past Sergio Romero.
This is crazy, I still cant believe it, Bolat said. I thought Ill take a chance and head upfield.
AZ had held the lead for more than 50 minutes after Jeremain Lens scored in the 42nd.
The Dutch side finished last.
In the other group, Alberto Gilardino scored in injury time to give Fiorentina a 2-1 win at Liverpool and first place in its Champions League group.
Five-time European champion Liverpool was already eliminated ahead its final group match but led in the 43rd minute through Yossi Benayoun. Martin Jorgensen equalized for already qualified Fiorentina 20 minutes later and Gilardino secured his teams fifth straight tournament win.
Fiorentina topped Group E ahead of Lyon, while Liverpool finished third and faces the ignominy of being in the draw for the next round of the second-tier Europa League on Dec. 18 rather than the Champions League.
Lyon scored two goals in each half to rout last-place Debrecen 4-0.
At this club you try to stay in the big tournaments as long as possible, but its gone now, Liverpool captain Steven Gerrard said.
Real Madrid, AC Milan, Bayern Munich and CSKA Moscow advanced Tuesday.
Manchester United, Bordeaux, Chelsea and FC Porto are the other teams in the draw for the next round, which will take place in Nyon, Switzerland, on Dec. 18.