Real storm back to take charge of Malaga tie
Real coach Mourinho threw caution to the wind with a triple substitution after delivering a withering half-time team talk with his side trailing 2-0, calling them "rubbish."
Two of his replacements, Sami Khedira and Karim Benzema, and Gonzalo Higuain led the fightback, netting between the 68th and 78th minutes to turn the tie and spare Real's blushes.
"I told the players at half-time I would have changed all 11 if I could have," Mourinho told reporters.
"I had considered making changes before the break but I don't like to do this. I asked them to clean up the rubbish of the first half."
Up to that point, the underdogs had held sway in the cup with three surprise results earlier in the evening.
Third tier Mirandes, who knocked out Villarreal in the previous round, took a 2-0 lead over Racing Santander while another Segunda B side, Albacete, drew 0-0 with Athletic Bilbao.
Second division Alcorcon, who eliminated Real Zaragoza last month, grabbed a 2-1 win at home to high-flying Levante, who lie fourth in La Liga.
Qatari-owned Malaga had been thrashed 4-0 and 7-0 in their last two meetings with Real, but took the lead through Sergio Sanchez and Martin Demichelis, both scoring with headers from Santi Cazorla corners.
Mourinho threw on Germany midfielders Khedira and Mesut Ozil and France striker Benzema for the second half to try and shake his side out of their lethargy, and the former barged his way through to start the fightback.
Argentina's Higuain pounced on a wayward back-pass to level two minutes later and Benzema slotted the third after a wonderful back-heel from Higuain as Malaga desperately tried to keep the floodgates closed.
"We gave them a goal at a crucial moment," Malaga coach Manuel Pellegrini said referring to Sanchez's under-hit back-pass for the equaliser.
"We should have come away with a better result. We had the chances to finish them off."
Pablo Infante was the hero for Mirandes, scoring after 32 minutes and laying on the second for Mikel Martins just after the restart, leaving La Liga's lowest scoring team Racing with a tough task in the second leg.
Alcorcon, who famously dumped city neighbours Real out of the cup while in the Segunda B two years ago, surprised Levante with Borja Perez and Nagore twice giving them the lead.
Last season's losing finalists Barcelona are at home to Osasuna on Wednesday. The second legs will be played next week.