Former Blackburn Rovers and Manchester City striker Roque Santa Cruz was among the goals as Malaga recorded a 4-3 win in their Copa del Rey trip to Segunda Division B side Cacereno.
Visiting Malaga broke the deadlock with four minutes played when Oguchi Onyewu, who once had a loan spell with Newcastle United, scored from inside the area on his first start for the club.
Santa Cruz then grabbed his first of the night in the 22nd minute, before Jaraiz Borreguero halved the deficit moments later.
A strike from Macias Albiac three minutes before the break then drew the hosts level.
However, after the restart a goal from Portuguese defender Duda and another from Santa Cruz put Manuel Pellegrini's side back in command of the tie.
There was still time for Cacereno to reduce the arrears in the closing stages as Esteve Rodriguez scored from close range.