Raheem Sterling scored twice in as many minutes as Manchester City produced a superb late comeback to beat Borussia Monchengladbach 4-2 and top Champions League Group D.
Needing a win to have any chance of pipping Juventus to top spot, City trailed 2-1 at half-time at the Etihad on Tuesday night, David Silva's opener (16) cancelled out by goals from Julian Korb (19) and Raffael (42).
However, City dominated the second half and, buoyed by the news that Sevilla had taken the lead against Juventus, eventually got their reward.
Sterling, celebrating his 21st birthday, equalised in the 79th minute then quickly made it 3-2 before Wilfried Bony ensured victory with a fourth (85).
City are now guaranteed to avoid Real Madrid, Barcelona and Bayern Munich in the last 16, while Gladbach finish bottom of the group and miss out on the Europa League.
The Foals went into the contest as one of the form teams in Europe, having not lost since their defeat to City in the reverse fixture in September.
Unsurprisingly, they stuck with the same side that upset Bayern Munich at the weekend while City made four changes from their loss at Stoke, with Eliaquim Mangala, Gael Clichy, Yaya Toure and Fabian Delph starting, and Sterling leading the line.
It was the 3,000 visiting fans who made all the noise in the early stages as Korb and Fabian Johnson fired over in a bright start.
But City struck first after 16 minutes as Sterling's clever backheel played in Silva and he rifled a shot past Yann Sommer at his near post.
The hosts' lead was shortlived as Johnson drove through the defence with relative ease and cut across for Korb to fire in the equaliser.
Gladbach looked the more confident side as they passed the ball around crisply before taking the lead late in the half as Oscar Wendt's cross deflected off Johnson and Raffael reacted first to finish past Joe Hart.
At half-time, it looked like an uphill task for City but they raised their game after the break and started to dominate proceedings.
Sterling nipped in as Nico Elvedi chested the ball back towards goal, but was denied by Sommer at close range.
The Gladbach keeper then saved from Silva and pulled off a fine stop to keep out Sterling's volley.
However, City's pressure eventually told in the 81st minute as Gael Clichy crossed from the right and Sterling tapped in from a few yards out.
The celebrations had barely died down by the time City took the lead again, with Sterling curling a shot home from Bony's pass.
And victory was secured five minutes from time as Bony finished from Aleksandar Kolarov's cross to round off a memorable night for City.