Substitutes Marco Asensio and Isco ensured Real Madrid avoided more Copa del Rey embarrassment against Alcoyano as the LaLiga leaders battled to a 3-1 victory in the round-of-32 tie.
Madrid were on the end of one of the greatest shocks in Spanish football history 12 months ago when losing to the same third-tier opponents at Estadio El Collao.
Eder Militao gave Madrid the lead late in the first half of Wednesday's clash, just like he did in last year's meeting, only for Dani Vega to hit back in style for the hosts.
But Carlo Ancelotti's side, who were without Karim Benzema, Thibaut Courtois, Luka Modric and Vinicius Junior, regained the lead through Asensio's heavily deflected strike 14 minutes from time before Isco's poked effort went in off goalkeeper Jose Juan to seal progression.
Alcoyano eliminated LaLiga's bottom side Levante in the last round and started strongly against Madrid, with Dani Vega testing stand-in keeper Andriy Lunin early on.
Eduardo Camavinga blocked a goal-bound shot soon after and the lively Vega had a penalty appeal turned down after being sent to the ground by Militao.
The game soon settled down and Madrid edged in front from their first attempt on target, Militao getting in front of Jose Juan to head in Rodrygo's corner.
Madrid never looked truly settled and Vega leveled up the game after driving into the box, cutting back inside past the chasing Casemiro and curling a shot away from Lunin.
But the visitors, whose 15-match unbeaten run was ended by Getafe last weekend, soon woke up and were back in front when Asensio's shot from the edge of the area, set up by Eden Hazard, took a big deflection and left Jose Juan wrong-footed.
Fellow substitute Isco thought he had himself got on the scoresheet two minutes later, but it went down as an own goal as the last touch from his prodded effort came off the veteran keeper.