Atletico Madrid battled to a 2-0 win against Salzburg thanks to a goal in each half from Mario Hermoso and Yannick Carrasco to secure a place in the UEFA Champions League knockout stages.
Diego Simeone's side beat Salzburg 3-2 in the reverse fixture - their only Group A win prior to Thursday (AEDT) - and needed just a point from the trip to Austria to advance.
Salzburg started strongly as they went in pursuit of the win needed to progress at Atleti's expense, but Hermoso's header against the run of play proved the game's big moment.
Mergim Berisha and Enock Mwepu hit the post either side of that effort, while Dominik Szoboszlai squandered a glorious chance, but Carrasco volleyed in a late second to ensure Atleti will join Bayern Munich in Tuesday's last-16 draw.
Berisha cut inside Stefan Savic and curled a low shot against the base of the post 113 seconds into the game as Simeone's men survived a number of early scares.
Sekou Koita was played in behind but failed to beat Jan Oblak with his weak attempt, and the visiting goalkeeper did well to turn Szoboszlai's precise shot past the post.
The chances kept on falling Salzburg's way, with Patson Daka firing over at the end of a counter, but Atletico soon grew into the game and led after 39 minutes.
Carrasco sent in a flat inswinger and Hermoso flicked the ball on, the final touch coming off the defender's shoulder for his first goal since March 2019 when still an Espanyol player.
A Salzburg leveller would have made for a tense finale but Szoboszlai placed the ball wide of the post after being played clean through on goal and Mwepu hit the upright from a long way out, the visitors restricted to shots from range by that point.
Atleti then wrapped things up with four minutes to go as Angel Correa picked out Carrasco at the back post on the counter to fire a crisp first-time shot away from Cican Stankovic.