Cristiano Ronaldo and Gonzalo Higuain scored late goals as already-qualified Juventus beat hosts Bayer Leverkusen 2-0 in the Champions League Group D finale on Wednesday to eliminate the Germans from the competition.
Ronaldo tapped in from close range in the 75th minute after having missed an almost identical chance in the first half and Higuain scored in stoppage time to put Juve top of the group on 16 points.
Atletico Madrid, on 10, also advanced with a 2-0 win over Lokomotiv Moscow, leaving Leverkusen in third place on six points and with a spot in the Europa League the next year.
Leverkusen started strongly and looked for an early goal but it was the Italians who came agonisingly close when Higuain cut into the box and Ronaldo was a fraction too late.
Leverkusen's Moussa Diaby then let fly from 20 metres and seemed set to beat 41-year-old keeper Gianluigi Buffon, who was making his first Champions League appearance this season, but the ball bounced off the post.
After the break, Juve controlled the pace with the hosts growing more desperate.
Ronaldo, who ended his goal drought earlier this month and also scored in the league at the weekend, struck with 15 minutes left, tapping in substitute Paulo Dybala's cross to end any lingering hopes of qualifying for the Germans.
Dybala then set up Higuain for their second goal with the Argentine scoring with a low drive.