Barcelona and Atletico Madrid advanced to the Copa del Rey quarterfinals on Thursday after chaotic victories over Unionistas de Salamanca and Real Madrid. The draw for Barcelona and Atletico Madrid to see which teams they play in the quarterfinals is on Friday, Jan. 19. Here is how each of those teams reached the last eight in the Copa del Rey.

Xavi, Barcelona survive scare against third-tier side

Barcelona drew Unionistas de Salamanca in the round of 16 in this season’s Copa del Rey. Unionistas, which plays in the third-tier Primera Federación, used penalties to defeat Villarreal to advance to the round of 16. It was the farthest the club has been in the competition in its brief 10-year history. Even though Unionistas does not have a fraction of Barcelona’s history, the third-tier club had Barcelona supporters nervous.

A thunderous goal in the first 45 minutes provided Unionistas the lead just after the half-hour mark. Alvaro Gomez met a looping cross first time on the volley that he pounded into the net. The sensational volley sent the 5,000-seat Reina Sofia Stadium into an uproar. The hosts nearly took that lead into the half, but Ferran Torres equalized for Barcelona on a breakaway in first-half stoppage time.

From that point on, Barcelona re-established its dominance. A pair of goals in the second 45 minutes ensured Barcelona advanced, but not in the comfortable fashion most expected. Jules Koundé and Alejandro Balde scored the goals in a five-minute span to open a two-goal lead in Salamanca. Barcelona closed the game with a lead in every statistical category, but there are still glowing issues in Xavi’s side.

Fiery Madrid Derby in the Copa del Rey

In Thursday’s other Copa del Rey round of 16 clash, Atletico Madrid hosted Real Madrid. This was a rematch of the recent Supercopa de España semifinal yielded an exhilarating 5-3 game that Real Madrid won en route to winning the first Spanish trophy of the year. The first half of the Copa del Rey tie had some of the same drama.

The first big chance of the game fell to arguably the best player in the world right now. Jude Bellingham went on a mazy run through the Atletico Madrid box before lashing a left-footed shot off the crossbar. Ten minutes later, Jan Oblak made several stops in the Atletico Madrid goal to deny both Rodrygo and Vinicius. The first portion of the game certainly fell in favor of the visiting Real Madrid.

Against the run of play, it was Atletico Madrid to snag the first goal. A deflected header from Antonio Rudiger in an attempt to deal with a cross fell straight to Atletico Madrid left winger Samuel Lino. The Brazilian slid as he guided the ball beyond Andriy Lunin in the 39th minute. The frantic finish to the first half featured an own goal from Atletico’s Jan Oblak. Despite several key saves in the first 45 minutes, the goalkeeper botched a clearing punch on a cross from Luka Modric. Oblak fanned on his attempt as the ball skipped into the net to equalize the game.

Atletico Madrid joins Barcelona in Copa quarters, Real out

Atletico Madrid found its second lead of the game in another moment of calamity for Real Madrid. Eduardo Camavinga moved to intercept an Atletico Madrid pass, but a wild deflection sent the ball directly between Lunin and Antonio Rüdiger. Neither the defender nor the goalkeeper were emphatic in their attempts to squash the attempt. Both got a touch on the ball, but it bounced straight to Alvaro Morata, who tapped the ball into an open net.

Both sides had strong chances after that. Rodrygo hit the crossbar before Lunin made a pair of massive saves on Griezmann and Morata to keep Real Madrid in the game, and to amend his previous errors in net. The outfield players in front of Lunin rewarded his efforts with a goal in the 82nd minute. Jude Bellingham’s shot attempt was blocked by an Atletico Madrid defender. The deflection fell straight to Joselu, who only came on as a substitute two minutes before this and was alone at the back post to head the ball in. The game entered an extra 30-minute period with the game still tied.

In the extra period, Atletico Madrid jumped out to its third lead of the game via Antoine Griezmann at the 100-minute mark. Another fantastic goal for Atletico’s all-time leading scorer came after a solo run and a powerful shot to beat Lunin on a tight angle into the top corner of the net.

Real Madrid had the ball in the net at the 110-minute mark after more calamitous play in the Atletico box. Bellingham was in an offside position when he received a pass at the six-yard box. Real Madrid bundled the ball in, but the Englishman’s shoulder was in an offside position in the build-up play.

With Real Madrid pressing forward, Atletico Madrid had chances on the counter-attack. Los Colchoneros put the game to bed in the 119th minute via a goal from Rodrigo Riquelme. Atletico Madrid successfully eliminated last season’s Copa del Rey champions in a final score of 4-2.