Bayer Leverkusen needed a result to stay alive in the Champions League, while already qualified Bayern Munich did not. In the end, the former got the win they wanted, while Bayern got a loss they hardly expected.
Leverkusen edged Group A fodder Real Sociedad 1-0 in San Sebastian, with central defender Ömer Toprak the unlikely goalscorer on Tuesday. Manchester United's win over Shakhtar Donetsk with the same score line was enough to see them through to Champions League's Round of 16.
Bayern had long assured themselves a place in the same phase but seemed hardly short of motivation against visiting English club Manchester City, finding themselves 2-0 up after just 12 minutes.
Both goals had more than a hint of offside to them. Forward Thomas Müller edged ahead of his marker before superbly controlling Dante's long ball and then threading his shot on five minutes.
Fellow attacker Mario Götze had snuck even further offside in the 12th minute when Manchester City failed to clear a corner, slotting from close range after finding Mario Mandzukic's scuffed effort at his feet.
Offside they might have been, but it could not hide the fact Bayern appeared a far better team than their opponents.
That seemed incapable of changing even when City pulled a goal back in the 28th minute, with David Silva poking home James Milner's header after a sweeping move.
Even at 2-2 on 59 minutes, when Aleksandar Kolarov scored from the spot, few would have tipped City to go on and win. But they did get the game's decision goal just three minutes later, after Jerome Boateng's quizzically failed clearance ensured James Milner could finish with aplomb to make it 3-2 to the visitors.
Bayern neither rallied nor even showed any sort of increased urgency, and Alvaro Negredo could have scored a fourth for City deep in the second half. Head coach Pep Guardiola gave little away with his po-faced manner on the touchline, but he must have been left disappointed by a performance that ended up so dull after such bright beginnings.
It was Bayern's first failure to win in the Champions League in 11 matches, and a first loss in 28 games in all competitions. Perhaps more than anything, however, it was a rude awakening for Guardiola and his men.
Leverkusen on the attack
It was a different story for the Bundesliga's other representative on Tuesday. Leverkusen needed at least a draw to give themselves a chance of moving from third in the group to second, with Manchester United's hosting of Shakhtar key to the fate of coach Sami Hyypia's men.
Attempting to do all within their control, Leverkusen began in an attacking frame of mind in San Sebastian.
Sociedad had scored just one goal in their five previous group stage matches, but have had little trouble finding the back of the net in Spain's La Liga. French striker Antoine Griezmann in particular was afforded a handful of first-half chances as Leverkusen's attempts to find an important goal often left them open at the back.
And for all their huffing and puffing, Leverkusen were unable to must more than a half-chance or three. Until the second half, however.
Managers are so often judged by their knack for making the right substitution at the right time. Hyypia did plenty for his reputation by introducing Robbie Kruse for Jens Hegeler at the break, with the Australian winger playing a key role in Leverkusen's goal.
His pace found him some space on the right, and he then crossed well for Kiessling. The towering striker's header was tipped over, but Leverkusen had the lead just moments later when Toprak bundled home as Sociedad made a hash of defending the corner.
The goal spurned Leverkusen on. Kruse and Kiessling combined in similar fashion on 55 minutes, and this time the latter's header crashed the crossbar.
Kiessling, Gonzalo Castro and Son Heung-min had further chances for Leverkusen, and perhaps on another night might have been punished for not putting at least one of them away. But with Phil Jones handing Manchester United a 67th-minute lead, Leverkusen had a buffer they could value.
And in the end, it was not needed for the result they wanted.
Places still up for grabs
Joining Manchester United, Leverkusen (both Group A) and Bayern and Manchester City (Group D) in the Round of 16 were Paris Saint-Germain, Olympiakos (both Group C) and Real Madrid.
Juventus or Galatasaray will join the latter in progressing from Group B, with their match postponed until tomorrow after a freak hail storm hit after 30 minutes of play.
Groups E to H will be decided on Wednesday, with Borussia Dortmund (F) and Schalke (E) still to confirm their qualification.