Real Madrid risk Manchester City or Paris Saint-Germain in the Champions League last 16, while Barcelona could face old foes Chelsea or Bayern Munich.
Madrid’s runners-up finish in their Champions League group puts them in Pot 2, with Manchester United, PSG, Roma, Liverpool, City and Besiktas their potential opponents.
A tie with United would represent a reunion for Cristiano Ronaldo, who spent six years at Old Trafford before his then-world record transfer to Los Blancos.
Barca, meanwhile, were the only Spanish team to finish top of their pool and are therefore La Liga’s only representative in Pot 1.
Standing in their way will be one of Basel, Shakhtar Donetsk, Porto, Chelsea and Bayern.
The Catalans took on Chelsea in two of the Champions League’s most famous semi-finals back in 2009 and 2012, winning the first but losing the second.
They were also thrashed 7-0 on aggregate by Bayern at the same stage in 2013 but exerted revenge two years later, when the Germans were coached by Pep Guardiola.
Finally, Atletico Madrid are joined by CSKA Moscow, RB Leipzig, Sporting CP, Spartak Moscow, Napoli, Celtic and Borussia Dortmund in the Europa League Round of 32.
The draw for both competitions takes place next Monday.
Champions League last-16 pots in full:
Pot 1: Barcelona, Manchester United, Paris Saint-Germain, Roma, Liverpool, Manchester City, Besiktas, Tottenham Hotspur
Pot 2: Real Madrid, Sevilla, Basel, Shakhtar Donetsk, Porto, Chelsea and Bayern Munich, Juventus