Aymeric Laporte and Sergio Aguero struck as Manchester City twice came from behind to qualify for the Champions League last 16 with a 2-2 draw at Lyon.
The outstanding Maxwel Cornet grabbed both goals for the hosts, who outplayed the Premier League champions for large spells at the Groupama Stadium.
The Ivory Coast forward opened the scoring in the 55th minute and restored the lead after Laporte's first equaliser, but Aguero had the final word.
The result was enough to ensure City will play in the knockout stages ,but they will have to wait until the visit of Hoffenheim next month to try to secure top spot in Group F.
Given the way the game unfolded, City will be glad to be leaving France with a result.
Lyon could easily have been out of sight by half-time, such was their early dominance. Memphis Depay and Cornet both fluffed good chances and the latter volleyed against the woodwork.
City, who have made an outstanding start to their Premier League title defence, have rarely looked as vulnerable of late as they did.
Despite speculation, manager Pep Guardiola opted not to start 18-year-old Phil Foden, but the experienced, attacking midfield he deployed struggled to impose itself.
Cornet had a chance from a corner in the opening minutes, but the impressive Laporte blocked.
Former Manchester United winger Depay should have opened the scoring when the ball was played in to him in front of goal, but he mis-kicked from yards out.
City responded by creating long-range chances for Riyad Mahrez and David Silva, but Lyon goalkeeper Anthony Lopes was not troubled.
A fine challenge from Laporte denied Cornet another chance and Marcelo miscued a shot before Depay blazed over.
Cornet looked certain to score on the half-hour when picked out unmarked, but, under pressure from Laporte, he contrived to miss. He made a better connection with his volley just before the break, but this time he hit the woodwork.
Cornet finally got reward for his efforts 10 minutes into the second half as he gave the hosts the lead with a stunning strike. City did not regroup after Lyon took a quick free-kick and Depay found Cornet on the right edge of the area. He took a touch and then curled a fine shot over Ederson into the far top corner.
That finally jolted City into life and Aguero forced a brilliant point-blank save from Lopes with a firm header from a Mahrez cross.
The equaliser came on 62 minutes, the danger again coming from a cross from the right. This time it was Raheem Sterling who delivered it from a free-kick, with Silva flicking on for Laporte to bury a bullet header.
City almost had another soon after as Lopes failed to hold a Leroy Sane shot and had to scramble to grab the ball on the line.
Yet Lyon were far from done and continued to push forward. Cornet forced a save from Ederson before claiming his second goal nine minutes from time. Again he was played in by Depay and Laporte this time could not catch him as he slipped a shot through Ederson's legs.
City again needed to respond and did so almost immediately, much to their relief, with Aguero meeting a Mahrez corner with a deft near-post header.