David Silva’s equaliser earned Manchester City a 1-1 draw at Borussia Monchengladbach as both sides had a man sent off.
City failed to replicate the intensity of their victory over Barcelona earlier this month but they ultimately did enough to ensure their progress from Group C.
Raffael gave City cause for concern with a superb strike midway through the first half at a lively Borussia-Park but Silva changed the complexion of the game just before the interval.
The dismissals of Lars Stindl and Fernandinho for second bookable offences early in the second half sucked life out of the game and City ended up playing for the final whistle.
Monchengladbach also faded as the game wore on and settled for a result which guaranteed them third place in the group and a tilt at the Europa League after Christmas.
City began with a three-man back line and a packed midfield but while that allowed them to control possession early on, they gained little from it aside from a couple of early corners.
Monchengladbach came into the game in poor form but they looked a much stronger side than 13th in the Bundesliga suggested and better than the team swept aside by City in September.
The hosts were dangerous on the counter-attack and served warning of their threat as Fabian Johnson had a shot blocked and then forced a save from Claudio Bravo after being played in by Raffael.
City looked uncertain at the back and were punished when Stindl got the better of John Stones out wide and fed Raffael, who lashed in a fierce shot from the edge of the area.
The goal forced City to switch to a back four with Jesus Navas dropping back from his usual advanced position to right-back.
It was an unfamiliar position for the Spaniard but the new shape worked for City, who immediately went close when Ilkay Gundogan tested Yann Sonner with a low drive.
The game was paused for a moment when a bottle thrown from the crowd landed close to Sergio Aguero but it was an isolated incident.
City could have fallen two behind after Bravo gave the ball away and Oscar Wendt charged past Fernandinho and Aleksandar Kolarov but the goalkeeper redeemed himself with a good save.
Sonner also saved from Aguero after Raheem Sterling got behind the Monchengladbach defence but City drew level on the stroke of half-time when Silva slid in to turn home Kevin De Bruyne’s ball from the byline.
The visitors tried to maintain the momentum after the break and Sterling put the ball in the net after a De Bruyne break but the flag was raised for offside.
Monchengladbach were reduced to 10 men after 52 minutes when Stindl, booked for a foul on De Bruyne in the first half, received a second yellow card following a clash with Otamendi.
Yet just as City might have sensed their opportunity, they also lost a man as Fernandinho was given his marching orders when he was deemed to have impeded Raffael and earned his second booking.
The double dismissal robbed the game of what fluency it had, with the focus of attention switching to Turkish referee Cuneyt Cakir, who seemed to get even more fussy as the game went on.
But with Barcelona beating Celtic, City knew a draw was sufficient to guarantee their place in the knockout phase for a fourth successive year.
The game meandered to its conclusion.