(CNN) -- Holders Bayern Munich equaled the record for successive Champions League wins held by their manager Pep Guardiola's former side Barcelona as they reached the knockout stages Tuesday.
Bayern eased past Czech champions Viktoria Pilsen 1-0 for a ninth straight victory and a perfect record in Group D with 12 points from four games.
They were joined in the last 16 by Manchester City, who thrashed CSKA Moscow 5-2 to remain in second place in the same group with nine points.
Bayern had won the home match against Pilsen 5-0, but made harder work of it on the road and had to wait until Mario Mandzukic's 62nd minute headed winner.
He connected with a Philipp Lahm cross, only six minutes after coming on as substitute, helping the Bundesliga giants to maintain their remarkable winning streak in Europe's premier club competition.
It was the sixth successive time Bayern have made it to the last 16, while City were making it for the first time after two previous attempts.
Having beaten Norwich 7-0 in an English Premier League match at the City of Manchester Stadium Saturday, Manuel Pellegrini's team again ran riot against their Russian opponents.
Sergio Aguero provided the initial impetus with an early penalty and then a delightful second before setting up Alvaro Negredo for the third.
Negredo went on to complete his hat-trick in the second half, but defensive frailties saw Seydou Doumbia twice pull back goals for CSKA, the second from the penalty spot.
CSKA, who were given a partial stadium ban by UEFA for racist chanting aimed at City midfielder Yaya Toure in the reverse fixture in Moscow, which the visitors won 2-1, have only a Europa League place to play for now.
The thumping victory was particularly sweet for Toure. "I think today is a special day for the club to go through to the second round for the first time," he told Sky Sports.
City's neighbors Manchester United stayed top of Group A after a goalless draw at Real Sociedad, but had Marouaune Fellaini sent off in the second half.
Robin van Persie also missed a penalty after coming on as a late substitute for United.
Shakhtar Donetsk and Bayer Leverkusen shared a goalless draw in the Ukraine in the other match played in the group.
In Group B, Juventus kept their qualification hopes alive as they held Real Madrid to a 2-2 draw in Turin.
Juve led through Arturo Vidal's first half penalty before Cristiano Ronaldo and the world's most expensive player Gareth Bale scored fine goals to put Real ahead.
Fernando Llorente scored a crucial leveler for Antonio Conte's men to deny Real for now their passage into the last 16.
With FC Copenhagen's 1-0 home win over Galatasaray, Juve dropped to last in the group, but trail the Danes and the Turks by just one point with two rounds to play.
Galatasaray must also next travel to Real, who are all but mathematically assured of their place in the knockout stages.
Paris Saint Germain must also wait to progress from Group C and needed Zlatan Ibrahimovic's equalizer to secure a 1-1 home draw against Anderlecht.
Olympiakos beat Benfica 1-0 to improve their chances of going through, moving to within three points of PSG in the standings.