Real Madrid will host city rivals Atletico Madrid in the Copa del Rey quarter-finals next week after the draw was made at the Spanish FA's headquarters on Friday.
The pair last met in the competition in the 2012-13 final, which Atletico won 2-1. The Spanish and European champions will be a tough assignment for Atletico, whose manager Diego Simeone is on thin ice after a difficult season so far. His side finished last in their Champions League group and are fourth in LaLiga, having won only one of their last six games.
Barcelona were also handed a tough task in the draw, which pitted them against in-form Real Sociedad, who are third in the LaLiga standings and unbeaten since early November. Valencia will host Athletic Bilbao and Osasuna will host Sevilla to round off the quarter-finals. The matches take place between Jan. 24 and 26, with the Spanish FA to announce the schedule later on Friday.