Real Madrid have been drawn against local rivals Atletico Madrid for the quarterfinals of the Copa del Rey, while Barcelona will face Real Sociedad.

Madrid came from 2-0 down to win 3-2 at Villarreal this week, sending them through to the quarterfinals where they will host Atletico, who beat Levante in the previous round.

Stream on ESPN+: LaLiga, Bundesliga, more (U.S.)

Carlo Ancelotti’s side have already beaten Atletico once this season — 2-1 away victory in LaLiga on Sept. 18 — and face them again in the league on Feb. 26.

Meanwhile, LaLiga leaders Barcelona, who cruised past Ceuta 5-0 on Thursday in their Copa game, host Real Sociedad at the Camp Nou.

Barca have won the Copa a record 31 times. Xavi Hernandez’s side ousted holders Real Betis on penalties in the previous round.

Elsewhere, Osasuna — the only team alive in the competition that has never lifted the Copa — host Sevilla, while Valencia go up against Athletic Bilbao.

The quarterfinals will be the last round played as a single game. The matches are scheduled between Jan. 24-26.

The Copa final will take place on May 6 at Seville’s La Cartuja stadium.

Real Madrid vs. Atletico MadridOsasuna vs. SevillaValencia vs. Athletic ClubBarcelona vs. Real Sociedad