Malaga suffered a shock Copa del Rey exit to their second division neighbours Cordoba.
Juande Ramos' LaLiga side were seeking to overturn a 2-0 first-leg deficit, but Cordoba enjoyed an incredible 4-3 away victory to win 6-3 on aggregate.
Sandro twice gave Malaga the lead in the first half, but Federico Piovaccari levelled each time and Pedro Rios' 66th-minute penalty gave Cordoba the lead on the night.
Michael Santos made it 3-3 two minutes from time, but Rios had the final word in the Andalusian derby as Cordoba booked their place in the last 16.
There were no such worries for Atletico Madrid as they brushed aside Guijuelo 4-0 to win 10-1 on aggregate.
Atletico boss Diego Simeone named a strong side and Nicolas Gaitan, Angel Correa, Juanfran and Fernando Torres all scored before half-time.
Antonio Pino managed a consolation for the third tier minnows.
Las Palmas beat Huesca 2-1 to move through to the last 16 4-3 on aggregate.
Mateo Garcia (13) and Asdrubal (60) put Las Palmas in control before Kilian Grant grabbed a stoppage-time consolation.
Real Sociedad also progressed as a 1-1 draw against Real Valladolid secured a 4-2 aggregate win.
Juanmi headed Sociedad into an 11th-minute lead before home defender Mikel Gonzalez put through his own net.
Villarreal also eased through 4-1 on aggregate against Toledo after drawing the home tie 1-1.
Samu Villa (56) raised Toledo hopes of causing an upset, but Alexandre Pato struck three minutes later with his fifth goal of the season.