The Frenchman's first-half strike was canceled out at the death by the former Villarreal man as the hosts saw their lead at the top of the league reduced to eight points
Despite the visitors enjoying large spells of possession during the game, Karim Benzema put Los Blancos ahead until Santi Cazorla fired in a beautiful stoppage-time equalizer to ensure the spoils were shared.
The game began with a flurry of chances for both sides and Wilfredo Caballero was the first goalkeeper to be called into action after just two minutes. Benzema met Lassana Diarra’s cross at the near post and flicked it on goal, almost looping it over the keeper.
Malaga were unperturbed and forced a save from Iker Casillas just two minutes later. Santi Cazorla spotted Salomon Rondon’s run across the top of the box but the Venezuelan could not find the corner of the goal with his effort.
After Caballero made another two saves from Cristiano Ronaldo and Kaka respectively, the visitors forged another great chance to take the lead on the 15 minute mark. Nacho Monreal breezed past makeshift right back Diarra and played the ball to Isco but he dragged his shot wide of the goal.
In an open game, Los Boquerones seemed unfazed by the task at hand but looked occasionally vulnerable to the Madrid counterattack.
With 28 minutes played Benzema changed the pace of the attack with a cute one-two one the left of the box with Ronaldo. The France international opened his body and looked to bend the ball into the bottom corner but failed to hit the target.
The deadlock was broken in the 35th minute and it was the hosts who took the lead. Ronaldo was given too much space on the left and bent in a delightful ball and Benzema finally got his goal with a simple header at the back post.
The second half was a much more subdued affair with both sides adopting a tentative approach in order to not be exposed.
Manuel Pellegrini brought Ruud van Nistelrooy on for the final 30 minutes as his side tried to find and equaliser. The Dutchman was given a rapturous ovation by the home crowd for whom he won two Liga titles.
Moments after Monreal produced a last-ditch clearance to deny Benzema a tap in, Caballero saved expertly from Ronaldo. With an hour played Kaka’s through ball put the Portuguese in on goal. He attempted to caress the ball past the Argentine keeper but his strong hand kept the ball out.
Malaga were clinging on as Madrid upped the tempo with two efforts in quick succession. Mesut Ozil was proving dangerous on the ball as he initiated a move that ended with Jose Callejon seeing his header cleared behind by Monreal with 20 minutes remaining.
One minute later Benzema missed a golden chance to put the game to bed. Ozil’s cutback from the left looked to have gifted him a goal but he somehow fired the ball wide of the target.
The visitors searched for an equalizer and it came in dramatic fashion. Cazorla fired in a pearler of a free kick from 25-yards out to rescue a point for his side in stoppage time.
The late goal means that Jose Mourinho's men saw their lead over Barcelona at the summit of La Liga reduced to eight points. Malaga now sits in fourth together with Levante