Bayern Munich were forced to dig deep against Celtic before securing a place in the Uefa Champions League last 16, but there was no such luck for AC Milan who were dumped out by Feyenoord.
Bayern were defending a 2-1 lead over Celtic in their play-off tie from last week's first leg but the Bundesliga leaders were unable to control the tie, with Harry Kane hitting the bar before half time.
It was Celtic who went ahead on 63 minutes thanks to Nicolas Kuehn, the former Bayern player, who slotted low into the net after a failed attempt to win the ball by Kim Min-jae.
The match was heading for extra time, but Bayern did not need to go that far as they scored in the fourth minute of injury time.
Alphonso Davies bundled the ball in from close range to make the score 1-1 and clinch the tie for the six-time European champions 3-2 on aggregate.
Vincent Kompany's team will find out their last-16 opponents when the draw is made on Friday, but it will be either German rivals Bayer Leverkusen or Atletico Madrid.
"Of course, we always want to dominate and be much better than the opponent, especially here. But the result is always the most important thing," Kompany said.
Bayern, who have an eight-point lead over second-placed Leverkusen in the Bundesliga, could be without star man Kane on Sunday at home to Eintracht Frankfurt, who are five points further back in third, with the striker taken off at half time.
"We were in Glasgow on Wednesday. Then Leverkusen. Big energy output. It is normal after the second game to take an extra day to recover," Kompany said, adding that Kane's knock to the face in the game at Leverkusen had not been serious.
"He [Kane] gave the thumbs up this morning. But during the game he felt like he was wasn't fully able to help the team," said the coach. "We did not want to take the extra risk. How long or if he is injured, I still don't know."
It was a heartbreaking way for Celtic to go out but the Scottish champions will take heart from their performance over the two legs.
"It never looked like we were going to concede the goal that we did and sadly for us, we did. I can only take immense pride from the performance and the guys gave everything," said Celtic manager Brendan Rodgers.

Milan eliminated
Seven-time winners Milan were eliminated by Feyenoord, a 1-1 draw at San Siro taking the Dutch club through 2-1 on aggregate.
Santiago Gimenez, playing against the club he left just last month, had put Milan ahead on the night from close range in the first minute to level the tie on aggregate.
However, Milan had Theo Hernandez sent off early in the second half for a second booking, and Feyenoord levelled through Julian Carranza on 73 minutes.
The visitors had Givairo Read shown a red card at the end of the game as they held on to win the tie.
Feyenoord interim boss Pascal Bosschaart was full of praise for his team's character after recent upheaval at the club.
The Dutch club's preparations for last week's first leg were far from ideal when Feyenoord sacked Brian Priske two days before the play-off game, but Bosschaart led them to a 1-0 win at home and they finished off the job at the San Siro.

"This says about the team that they have character. I think that's what I'm most proud of," Bosschaart said.
"You have to remember that they come from a very difficult phase, have received a lot of criticism, a change of coach, and then an unknown person comes in front of the group who occasionally throws in some empty slogans.
"That is a very difficult phase for them but I do think we are very clear, very transparent and very honest and this group responds very well to it, so I am proud of it."
Meanwhile, Club Brugge teenager Chemsdine Talbi's double helped his side to get a three-goal lead at Atalanta before they held off a second-half onslaught for a 3-1 victory to reach the last 16 5-2 on aggregate.
Ferran Jutgla netted the visitors’ other goal as Brugge stunned the Italian side by taking a 3-0 half-time lead, but they had to fight a desperate rearguard action in the second period as the hosts tried to conjure up an unlikely comeback.
Ademola Lookman pulled a goal back for Atalanta but then had a penalty saved by veteran goalkeeper Simon Mignolet, who made several other important stops to stymie home hopes and see the Belgian side advance to the next round.
They will face either Lille or Aston Villa, with their opponents to be decided in Friday's draw.
Also, Benfica drew 3-3 at home with Monaco to win their play-off tie 4-3 on aggregate and go through to play either Barcelona or Liverpool next.

