Reigning Spanish Cup holders Real Madrid face a tough defence of their title following Friday's draw.
The European champions were paired with third division Cornella in the last 32 of the King's Cup but should they come through that they would likely face city rivals Atletico Madrid in the last 16 and then last season's beaten finallists Barcelona in the quarter-finals.
Atletico were also paired with a third tier side, L'Hospitalet, as were Barca, who plucked Huesca.
Last 32 first legs are due to be played on December 3 with the return games on December 17.
Real's participation in December's Club World Cup, though, means their first leg in Catalonia will be played on October 29 before the return at the Bernabeu on December 17.
Draw (first division teams unless indicated):
Deportivo La Coruna v Malaga
Albacete (D2) v Levante
Las Palmas (D2) v Celta Vigo
Alcoyano (D3) v Athletic Bilbao
Rayo Vallecano v Valencia
Alaves (D2) v Espanyol
Grenada v Cordoba
Sabadell (D2) v Sevilla
Huesca (D3) v Barcelona
Valladolid (D2) v Elche
L'Hospitalet (D3) v Atletico Madrid
Cornella (D3) v Real Madrid
Cadix (D3) v Villarreal
Real Oviedo (D3) v Real Sociedad
Real Betis (D2) v Almeria
Getafe v Eibar
Source: AFP