Karim Benzema opened the scoring when he turned home Cristiano Ronaldo's low cross after just 18 minutes to register his 13th goal of the season.

Malaga 'keeper Carlos Kameni then kept his side in the game with a string of impressive saves as Ronaldo was held scoreless for the first time in the league this season.

However, Gareth Bale smashed home a second seven minutes from time and the visitors held on despite having Isco sent-off moments later and seeing Roque Santa Cruz half the hosts' deficit in stoppage time.

Real boss Carlo Ancelotti named his strongest available side as Iker Casillas, Marcelo and Dani Carvajal returned after being rested in the 1-0 Champions League win at Basel and the Italian was rewarded with a fast start.

Bale's fierce effort from outside the box was beaten away by Kameni and the Cameroon 'keeper then had to make a brilliant save to deny Ronaldo from close range moments later after he was teed up by Bale.

Casillas was forced into action at the other end on 14 minutes when he had to tip Santa Cruz's header behind for a corner.

However, just as Malaga were beginning to gain a foothold in the game, they were hit by a classic Madrid counter-attack as Ronaldo was freed down the left and his low cross was swept home at the near post by Benzema despite Malaga's protests that Weligton had been fouled by the French striker.

Casillas had a lucky escape midway through the half when Sergi Darder's dipping volley slipped between his legs and off the outside of the post.

Bale was denied once more by Kameni as the 30-year-old bravely blocked at the Welshman's feet after he had slightly overrun another fine through ball from Ronaldo.

Malaga were unfortunate not to be level once more before the break when Duda's long-range free-kick came crashing off the bar.

The visitors also started the better after the break, but Bale's frustrating night in front of goal continued as he headed Toni Kroos's free-kick inches over before Kameni rushed from his line to deny former Malaga man Isco sealing the three points from another fine Ronaldo through ball.

Ronaldo had a golden opportunity to extend his 11-game scoring streak in La Liga when presented with the ball inside the area thanks to a defensive mix-up between Weligton and Marcos Angeleri, but even he couldn't beat Kameni as the former Espanyol stopper dived to his right to turn the ball to safety.

That miss nearly proved costly as Casillas spilled Samu Castillejo's low effort and recovered just in time to prevent Santa Cruz forcing the ball home from close range.

The European champions finally doubled their advantage when Bale sprinted onto Ronaldo's headed flick-on and on his less favoured right foot fired high past the prone Kameni.

Isco's return to La Rosaleda then ended early when he was shown a second yellow card, but from the resulting free-kick, Malaga's luck was out again as this time Juanpi struck the woodwork and Angeleri blasted the rebound over.

Casillas was finally beaten in stoppage time when Santa Cruz headed home Arthur Boka's cross, but there was barely time for the Andalusians to launch another attack as they slipped to a first home defeat of the season.