Real Madrid and AC Milan have advanced to the knockout stage of the Champions League. Borussia Dortmund and Schalke also progressed to make it three out of three teams from Germany.
City needed a win to keep its hopes alive going into the Group D finale, but Karim Benzema exploited sloppy defending to put Madrid ahead after just 10 minutes at Etihad Stadium.
City secured a lifeline in the 74th when Alvaro Arbeloa was sent off after fouling Sergio Aguero and the Argentina striker subsequently equalized from the penalty spot.
But in Jose Mourinho's 100th match managing in the Champions League, Madrid held on for the draw to qualify behind leader Borussia Dortmund with a game to spare.
"The only two times I finished second in the group, I won the Champions League,'' said Mourinho, who won the competition with FC Porto and Inter Milan. "It means something (to finish top), but my experience is, it doesn't mean so much.''
Mario Goetze was involved in all four goals, including two by Robert Lewandowski, as Borussia Dortmund cruised into the knockout stage of the Champions League by outclassing Ajax 4-1 on Wednesday.
Dortmund sealed the win before halftime at Amsterdam Arena thanks to its clinical finishing on the break and Goetze's skill and vision.
The 20-year-old Germany forward set up Marco Reus for the opener, scored the second, while his 41st-minute shot was blocked by goalkeeper Kennneth Vermeer with Lewandowski gratefully snapping up the rebound.
"In the first half they were only in front of goal three times and they scored three goals. They were so effective,'' said Ajax captain Siem de Jong.
Shortly before being substituted, Goetze crossed from the left in the 67th minute to Lewandowski, who controlled the ball and shot past Vermeer from a tight angle for his fourth goal of this Champions League campaign.
PSG was second in Group A with 12 points, one behind leader FC Porto with a game to spare. Dynamo was third on four points and will move on to the Europa League.
Ezequiel Lavezzi scored both goals.
The Argentine struck in the closing minute of the first half with a lob from the right side and an assist from Zlatan Ibrahimovic. Seven minutes into the second half, Lavezzi was alert to convert a quick pass in the box for his second strike after defender Yevhen Khacheridi's back pass to the goalkeeper rolled short.
FC Porto beat Dinamo Zagreb 3-0 in the Champions League on Wednesday to set up a decider with Paris Saint-Germain in two weeks' time for the top spot in Group A.
Group leader Porto, undefeated so far, has 13 points to 12 for the second-place French club. They meet in Paris for the last group game on Dec. 4 to determine the top-seeded team in the draw for the tournament's knockout stage.
Lucho Gonzalez, unmarked in the Dinamo area, hit a left-foot shot for his second goal in the tournament after 20 minutes. Portugal's Joao Moutinho fired in a 67th-minute free kick, and Silvestre Varela sealed the victory five minutes from the end.
After a poor first half, Wilshere brought Emirates Stadium to life in the 49th minute by flicking home a deft finish from Olivier Giroud's nod-down.
Podolski gave winless Montpellier too much to do by rifling in a sensational 63rd-minute volley after exchanging a one-two with Giroud, a former player of the French team.
Schalke defeated Olympiakos 1-0.
After Stephan El Shaarawy had given Milan a 1-0 lead in the 47th minute, the France defender put the game away with a strike which had shades of Zlatan Ibrahimovic's brilliant bicycle kick against England last week.
In the 71st minute, Mexes received a free kick on the edge of the box but found himself with his back to goal. In a seemingly hopeless situation from 20 meters out, he chested the ball upward before propelling himself off the ground and launching an overhead kick that dipped over goalkeeper Silvio Proto's head and into the far corner.
Zenit St. Petersburg came from 2-0 behind to draw with Malaga 2-2 in the Champions League on Wednesday.
Malaga qualified for the last 16 in its first Champions League campaign two weeks ago, while Zenit's hopes in Group C depended on AC Milan not winning the late match against Anderlecht.