Atletico Madrid was so poor in the first half against fourth-division visitor Sant Andreu that a shock Copa del Rey elimination wasn't a far-fetched possibility on Wednesday.
But with three goals in the opening 10 minutes of the second period, Atletico's second-string team put an end to any fears of an upset at Wanda Metropolitano Stadium.
Thomas Lemar scored in the 48th minute, Nikola Kalinic in the 53rd, Angel Correa in the 55th and Victor "Vitolo" Machin in the 81st to secure a 4-0 win and a place in the last 16 following a 5-0 aggregate victory.
Atletico was without Diego Costa because of injury, while Antoine Griezmann and several other regular starters were rested by coach Diego Simeone, who was banned from the bench as he served the second of a three-game suspension following a rant in a Copa match against Sevilla last season.
The home side struggled in the first half, with goalkeeper Antonio Adan forced to make several saves.
Substitute Lemar went on at halftime and was key for Atletico, opening the scoring with a right-footed shot from outside the area. Kalinic added a header and Correa produced a fine finish with the outside of his right foot. Vitolo's goal from close range came after a pass by Saul Niguez.
In matches between first-division clubs, Girona came from behind to defeat visiting Alaves 2-1 and advance 4-3 on aggregate, while Real Sociedad beat Celta Vigo 2-0 to go through 3-1 overall.
Alaves struck first at Montilivi Stadium in Catalonia with an own-goal by Pedro Alcala in the 62nd minute, but the hosts rallied through Alex Granell in the 74th and Cristian "Portu" Portugues in the 79th to reach the last 16 for the first time.
Sociedad sunk Celta with two superb goals by Mikel Oyarzabal and Adnan Januzaj.
Oyarzabal netted in the 10th with a booming long-range shot into the top corner, and Januzaj scored in the 27th with a curling strike.