Barca face Anoeta trip, Madrid draw Celta
Barcelona face a tricky tie with Real Sociedad in the Copa del Rey last eight, while Real Madrid will meet Celta Vigo over two legs.
Barcelona will hope to put their Anoeta troubles behind them when they meet Real Sociedad in the first leg of the Copa del Rey quarter-final.
The LaLiga champions have not won in San Sebastian since 2007 and needed a Lionel Messi strike to earn a point in their league visit in November.
They will get a chance to end that winless run of eight matches on January 17, though, before the return leg at Camp Nou a week later.
Real Madrid begin their tie with Celta Vigo at the Santiago Bernabeu as Zinedine Zidane's side's hunt for the treble continues.
The leaders made it a record 40 games unbeaten as they battled back to earn a 3-3 draw in the second leg of the last round against Sevilla on Thursday - eclipsing Barcelona's previous best of 39.
We've been drawn against in the quarter-finals of the Copa del Rey!January 13, 2017
Madrid's city rivals Atletico are also into the latter stages of this year's competition after beating Las Palmas 4-3 on aggregate.
They will meet Eibar in the last eight, while second division Alcorcon will face Alaves.
Get FourFourTwo Newsletter
The best features, fun and footballing quizzes, straight to your inbox every week.
Copa del Rey draw in full:
Real Sociedad v Barcelona
Alcorcon v Alaves
Atletico Madrid v Eibar
Real Madrid v Celta Vigo