PARIS (AP) -- Real Madrid and Bayern Munich put aside their domestic worries to impress on the European stage and qualify for the knockout rounds of the Champions League on Tuesday, as both Manchester clubs, Roma, Ajax and Juventus also advanced to the last 16 with one game to spare.
Following a 3-0 humiliating loss in the Spanish league at the weekend, three-time defending European champion Madrid recovered with a 2-0 win at Roma that secured first place in its group, and Bayern demolished Benfica 5-1 in the wake of yet another disappointing result in the Bundesliga.
Despite its home loss, Roma also advanced from Group G, with both teams knowing they were through following Viktoria Plzen's earlier 2-1 win at CSKA Moscow.
Gareth Bale put Madrid ahead at the Stadio Olimpico early in the second half before Lucas Vazquez doubled the visitors' lead from close range in the 59th minute.
Manchester City again struggled against Lyon and needed an 83rd-minute equalizer from Sergio Aguero to salvage a 2-2 draw in Group F and seal its spot in the knockout stage. Lyon is the last team to beat City, which has won 12 of its 14 games since a 2-1 home loss to Lyon in September.
After twice squandering a two-goal lead against Duesseldorf over the weekend, Bayern displayed its attacking force to give some respite to coach Niko Kovac, whose position looked under threat before the game.
Bayern leads Group E with 13 points, two more than Ajax, which cannot be overtaken by third-place Benfica. The Dutch side hosts its German rival to decide the group winner on Dec. 12.
Ajax moved into the last 16 for the first time in 12 years with a 2-0 win over 10-man AEK Athens, in a game marred by fan violence in and around the stadium.
LEWANDOWSKI TURNS 50
Bayern striker Robert Lewandowski scored twice to break the 50-goal barrier in Europe's top competition and join an elite group of seven players having achieved the feat. Lewandowski has now scored 51 Champions League goals, one more than former Arsenal striker Thierry Henry, but the Poland captain remains far away from Cristiano Ronaldo's record of 121 goals.
Arjen Robben also scored twice for the German champions and Franck Ribery completed the rout.
MAN CITY HELD
Manchester City twice came from behind in Lyon after Maxwel Cornet delivered a man-of-the-match performance and scored a brace.
Cornet, who has not been used much this season, had plenty of chances and put the hosts ahead in the 55th with a strike in the top corner. Aymeric Laporte equalized in the 62nd with a header from a set-piece.
Sergio Aguero earned the point City needed to guarantee a top-two finish in Group F, heading in a corner from Riyad Mahrez in the 83rd minute -- just after Cornet regained the lead for Lyon.
City leads the group on 10 points, three clear of second-place Lyon. The French team travels to Shakhtar Donetsk, which is two points further back in third, in two weeks with both teams still able to qualify.
SMOKE BOMBS IN ATHENS
UEFA will open a disciplinary case after Ajax's 2-0 win was preceded by violence inside Athens' Olympic Stadium and in parts of central Athens, mostly involving Greek fans who clashed with local rivals and riot police.
Moments before the game started, riot police charged into the stands to break up AEK fans who hurled flares and smoke canisters. Police reported no injuries or arrests, although images seemed to show one fiery explosion going off near a section of supporters.
Serb defender Dusan Tadic scored twice for Ajax, which returned to the Champions League group stage this season for the first time in four years.
Marouane Fellaini scored an injury-time winner as Manchester United beat Young Boys 1-0, a result that prompted a joyful reaction from United manager Jose Mourinho despite another unimpressive performance.
The Portuguese coach picked up a basket of water bottles and threw them forcefully to the ground in his technical area after Fellaini's goal ensured passage to the next round.
Without Fellaini's goal, United would have faced a tricky trip to Valencia on the final match day in a bid to seal qualification. Instead, the English club advanced along with Juventus, which stayed in first place thanks to a 1-0 win over Valencia.
Juventus leads Group H with 12 points, two ahead of United.