Two derbies feature in the Copa del Rey quarterfinals, with Barcelona facing Espanyol and Real Madrid taking on Leganes.
The draw on Friday also pit Atletico Madrid against Sevilla, and Valencia against Alaves.
Three-time defending champion Barcelona will play the first leg against its crosstown rival at Espanyol’s RCDE Stadium next week. It will host the return match at Camp Nou Stadium the following week.
Madrid also gets to host the second leg at home when it faces Leganes, which is based in the city of the same name just south of the Spanish capital. Leganes is playing only its second season in the first division of Spanish football.
Atletico and Sevilla is the matchup of teams better positioned in the Spanish league. Atletico is second and Sevilla fifth.
Third-place Valencia faces an Alaves side which is in the relegation zone but last season made it to the Copa del Rey final against Barcelona.