Holders Barcelona were knocked out of the Copa del Rey after suffering a 3-2 defeat in extra-time at Athletic Bilbao in the last 16.
Athletic went ahead early thanks to a beautiful cross-shot from Iker Muniain who curled the ball past Marc-Andre ter Stegen into the top corner.
Former Manchester City forward Ferran Torres equalised for Barca with a brilliant right-foot strike from the edge of the area, his first goal for the club.
Inigo Martinez put Athletic back in front after 86 minutes, winning a challenge against Gerard Pique to score, but Pedri netted a fine goal in stoppage time to send the game into extra-time.
Man-of-the-match Muniain scored the winner from the penalty after the video assistant referee spotted a handball from Jordi Alba inside the area.
Ten-man Real Madrid overcame a hostile atmosphere and fought back from a goal down in extra-time to beat Elche 2-1 and reach the Copa del Rey quarter-finals.
Following a scoreless 90 minutes, Elche took the lead with a free kick earned with Real down to 10 men after Marcelo was sent off for a foul on Tete Morente.
Experienced defender Gonzalo Verdu struck the free kick into the wall but his second effort deflected off Dani Ceballos and wrong-footed goalkeeper Andriy Lunin before ending up in the back of the net.
Real grabbed the equaliser when Isco deflected a Ceballos shot inside the box and substitute Eden Hazard scored the winner on a counter-attack after receiving a through ball from David Alaba, rounding the goalkeeper and finishing into an empty net.
The match ended in controversy as Elche found the net in the last minute of extra-time, but the referee disallowed the effort for a foul in the build-up.