Real Madrid will face second-division club Zaragoza in the round of 16 of the Copa del Rey, and Barcelona will take on struggling first-division team Leganés.

Friday's draw also setup a match between defending champion Valencia and third-division club Cultural Leonesa, which eliminated Atlético Madrid on Thursday.

The round of 16 will still be played in single-elimination games. Only the semifinals will be decided with a home-and-away series this season.

Real Madrid's Casemiro, second right, scores his second goal during the Spanish La Liga soccer match between Real Madrid and Sevilla at Santiago Bernabeu stadium in Madrid, Saturday, Jan. 18, 2020. (AP PhotoManu Fernandez)

Real Madrid's Casemiro, second right, scores his second goal during the Spanish La Liga soccer match between Real Madrid and Sevilla at Santiago Bernabeu stadium in Madrid, Saturday, Jan. 18, 2020. (AP PhotoManu Fernandez)

Madrid will play at Zaragoza, while Barcelona will host Leganés.

There were no restrictions involving the top-flight teams in the draw, except that the the lower-division clubs would get to play at home.

Zaragoza got past top-flight team Mallorca in the round of 32, while relegation-threatened Leganés ousted third-tier club Ebro. Barcelona and Madrid eliminated third-division clubs Ibiza and Unionistas de Salamanca, respectively.

The only other matchup between first-division clubs will be Real Sociedad versus Osasuna.

In other games between first- and second-division clubs, Sevilla will take on Mirandes, Athletic Bilbao will face Tenerife and Villarreal will play against Rayo Vallecano.

Badajoz, the other third-division club in the draw, will host Granada.

Eight first-division teams were eliminated in the round of 32: Atlético Madrid, Real Betis, Eibar, Celta Vigo, Valladolid, Espanyol, Levante and Mallorca.

More AP soccer: https://apnews.com/apf-Soccer and https://twitter.com/AP_Sports

Tales Azzoni on Twitter: http://twitter.com/tazzoni