European champions Real Madrid will travel to fourth division side Deportiva Minera in the third round of the Copa del Rey, while LaLiga leaders Barcelona have been paired with UD Barbastro.
Minera reached the round-of-32 after knocking out LaLiga side Alavés on penalties last week. Their reward is a home tie against Madrid at the Estadio Municipal Ángel Celdrán, which holds around 2,000 supporters.
Barbastro, who also compete in the fourth tier of Spanish football, will host Barça for the second season running after a 2-0 win against top flight side Espanyol last Thursday.
Fermín López, Raphinha and Robert Lewandowski were all on target last season as Barça secured a narrow 3-2 victory at the 5,000-capacity Estadio Municipal de Deportes.
As two of the four teams competing in the Spanish Supercopa next month, Madrid and Barça only entered the competition at the third round stage, along with holders Athletic Club and Mallorca.
Athletic face a trip to UD Logroñés, while Mallorca will travel to Pontevedra, with the ties due to be played in January.