Manchester City beat a weakened Bayern Munich side 2-0 on Wednesday but it was not enough to stop the Champions League debutants making a group-stage exit.
City, needing a win as well as Napoli to drop points at Villarreal in order to progress, went on the offensive from the start against the Group A winners but had to wait until the 36th minute for their opener.
It came with David Silva's low shot from 20 metres out after a neat flick by Edin Dzeko, who was the provider for their second, seven minutes after the restart, as his pass found a charging Yaya Toure who finished calmly.
City achieved their part of the equation that would take them through alongside Bayern but with Napoli winning 2-0 at Villarreal it was not enough for the English side, who now go through to the Europa League round of 32.
City manager Roberto Mancini showed his intention to attack by naming Samir Nasri, David Silva, Sergio Aguero and Edin Dzeko in the starting lineup and the quartet were involved in nearly every move forward.
The hosts had the ball in the back of the net in the 15th minute when Silva's free kick was headed in by Joleon Lescott but it was disallowed for a foul by the defender on Bayern keeper Joerg Butt.
Unperturbed, City continued to push forward with Dzeko heading wide a few minutes before he set up Silva nine minutes before the break.
They started the second half as they ended the first, doubling the score when Aguero played the ball through to Dzeko who had spotted Toure's perfectly timed run and the Ivorian slotted it past Butt.
Bayern, who named a team containing just three survivors from the one that started against City in their 2-0 win over the English club in Germany in September, lacked a cutting edge and aside from a couple of long-range shots offered little in reply.
Knowing that no matter how many goals their side scored, qualification was not in their hands, one of the most uttered questions among home fans throughout the game was "what's the score in the Napoli game".
The groans grew as news of the goals in Spain filtered through as City fans resigned themselves to watching the Premier League leaders compete in the second tier of European competition.
Bayern finish with 13 points from their six group games, with Napoli on 11, City on 10 and Villarreal on 0. (