Real Madrid moved back to within two points of La Liga leaders Barcelona with a 3-1 win over Malaga.
Madrid were hit with an early blow as Gareth Bale was forced off in just the fourth minute with a suspected calf injury, before Nordin Amrabat tested Iker Casillas from long range.
Bale's replacement, Javier Hernandez, almost opened the scoring when he diverted a cross towards goal, but Carlos Kameni pulled off a reaction save.
However, he could not prevent Sergio Ramos from giving the home side the lead when he turned a driven Cristiano Ronaldo free kick into the back of the net.
Malaga had their backs against the wall as James Rodriguez forced a fine low save from Kameni, before Ramos and Rodriguez had goals disallowed for offside.
The visitors had a golden chance to equalise as the ball fell to Sergi Darder in the box, but he blazed it way over the bar.
After the break, Malaga almost levelled as Amrabat flashed an effort inches past the post from distance.
However, Madrid were soon awarded a penalty as Rodriguez was fouled in the box. Ronaldo surprisingly missed as he crashed his effort against the post, but Rodriguez scored minutes later with a rifled shot into the top corner.
Malaga hit back immediately as Roberto Rosales set up Juanmi to half the deficit, but Madrid side sat back and maintained possession for large periods to stifle Malaga's attack as they looked for an equaliser.
Madrid then confirmed the three points as Ronaldo tapped in after Hernandez supplied him in stoppage time.