Barcelona have been drawn against Sevilla in the Copa del Rey quarter-finals, while Real Madrid will take on Girona.
In a rematch of the 2018 final, holders Barca will visit the Ramon Sanchez Pizjuan Stadium on either January 22, 23 or 24 before the return encounter takes place at Camp Nou the following week.
The Blaugrana have lifted the trophy in each of the past four seasons but their place in this year's competition was cast into jeopardy when Levante alleged Ernesto Valverde had fielded an ineligible player - teenage defender Chumi - in the first leg of the clubs' round-of-16 encounter.
The Royal Spanish Football Federation dismissed Levante's complaint on the grounds it was lodged too late.
Madrid, who overcame Leganes despite a 1-0 second-leg loss earlier this week, will attempt to succeed where city rivals Atletico Madrid failed against Girona in the previous round.
Santiago Solari's side are to host the first leg.
The draw pitted Getafe against struggling Valencia and Espanyol versus Real Betis in the other quarter-final ties.
Copa del Rey quarter-finals draw in full:
Real Madrid v Girona
Getafe v Valencia
Sevilla v Barcelona
Espanyol v Real Betis