Atletico Madrid thought they had qualified for the Champions League last-16, then Thomas Muller climbed off the bench to snatch it from them with five minutes left.
Bayern Munich, already with top place secured, had rested players for their penultimate group game but 1-0 down Hans-Dieter Flick put Muller on with half and hour left and he won and scored the penalty that leaves Diego Simone’s side still needing a point from their away game at RB Salzburg next Wednesday.
Joao Felix broke the deadlock for Atletico on 25 minutes when he turned in from close range after Marcos Llorente had swapped passes with Kieran Trippier and pulled the ball back from the byline for the Portuguese.
Substitute Thomas Muller earned an under-strength Bayern a draw with a late penalty. The Bayern forward drilled home his spot kick after being tripped by sub Felipe in the box.
In other match, Shakhtar Donetsk earned ashock win in October andrepeated the trick at home toleave Real Madrid in serioustrouble.
Real Madrid are in danger of a dramatic Champions League group-stage exit after they fell to a 2-0 away defeat against Shakhtar Donetsk.
Also, Manchester City and Porto will progress as winners and runners-up respectively from Champions League Group Cafter a goalless draw.
Porto joined Manchester City in the Champions League knockout stages after a 0-0 draw where Gabriel Jesus was denied a winning goal by VAR.