Manchester City battled back to winning ways, coming from a goal down to overwhelm Hoffenheim 2-1 in the Champions League with a brilliant Leroy Sane double that ensured they progressed to the last-16 as winners of Group F on Wednesday.
The already-qualified English champions, who had suffered their first league defeat in 22 matches at Chelsea on Saturday, needed a point to guarantee top spot but were quickly shocked again when going behind to an Andrej Kramaric penalty.
Yet in a hugely entertaining and open encounter, German starlet Sane inspired the comeback against the Bundesliga side with a magnificent free kick moments before the break and another neatly-taken left foot finish just after the hour.
The win, which should have been far more decisive such was City`s dominance with 25 goal attempts, saw them top the table on 13 points, ahead of second-placed Olympique Lyonnais, who qualified on eight after they had drawn 1-1 at Shakhtar Donetsk.
The Ukrainian side earned the Europa League spot in third place on six with Hoffenheim last on three.
"We are in the best 16 and now we are going to see the draw, and arrive at the right moment," City manager Pep Guardiola told BT Sport.
"We started flat because Hoffenheim were so demanding about how they attacked the space and, physically, they were stronger. Then we started to play. But the result is good -- we are first."
Guardiola had made it clear beforehand how important he felt topping the group would be in helping City avoid many of the best sides and must have been happy that they can now draw only Atletico Madrid, Schalke, Roma or Ajax Amsterdam in the last-16.
Hoffenheim made a bright, enterprising start, with Kramaric putting them ahead from the penalty spot in the 16th minute after Aymeric Laporte bundled over Benjamin Hubner in the box.
Yet after the Croat had continued his remarkable run of scoring for both club and country for a ninth match in a row, City poured on the pressure as both Gabriel Jesus and Nicolas Otamendi, with headers against the woodwork, cursed their luck.
With John Stones also thwarted by Oliver Baumann`s fine save, City looked to be getting frustrated until, in first-half stoppage time, Sane produced a magnificent curling left-footed free kick to equalise.
The largely one-way traffic continued after the break as Jesus and Otamendi both spurned chances and Sane somehow conspired to make a mess of the finish after Raheem Sterling had sprinted clear from just outside his own box.
Yet the 22-year-old, in searing form, made up for his blunder with a cool 61st minute finish from Sterling`s assist.
Guardiola described Sane`s free kick as "incredible" and used the same word to praise Phil Foden, the 18-year-old midfielder who is one of the brightest prospects in the English game and who delivered a fine performance on a rare start.
"He has to compete with David Silva, Ilkay Gundogan, Kevin De Bruyne, etcetera, but he can do everything," Guardiola said.
"He is a fighter, can score goals, has the body shape. He is only 18. We didn`t have any doubts he can play at the top level."
Hoffenheim manager Julian Nagelsmann said: "We would have gone further if we had got the points we should have done.
"As newcomers to this competition, we have learnt a lot, we have played well and come back several times in games."