Barcelona and Real Madrid will both face third-tier opponents in the Copa del Rey.
Defending champion Barcelona drew former topflight club Hercules, while Real Madrid was paired with Cultural y Deportiva Leonesa.
Atletico Madrid also drew a third-division club, Guijuelo.
The only fourth-division club to have reached this stage, the Balearic Island club Formentera, will face Sevilla.
Barcelona won its record 28th Copa del Rey last season, after Madrid was disqualified in the opening round for fielding an ineligible player.
The round-of-32 is the first involving the 20 teams from the first division.
The first leg will be played between Nov. 29-Dec. 1, while the return leg will be between Dec. 20-22.
For all the latest Sports News, download Indian Express App now