Real Madrid welcomed Malaga to the Bernabeu on Saturday looking to close the gap on La Liga leaders Barcelona to just two points.
The home side led 1-0 at the interval courtesy of a close-range finish from Sergio Ramos.
Cristiano Ronaldo had a golden chance to make it 2-0 after 67 minutes, but the Portuguese hit the post from the penalty spot.
Los Blancos had a second just two minutes later, however, when James Rodriguez found the top corner.
Malaga responded through Juanmi after 72 minutes, but Ronaldo had goal number 50 for the season in stoppage time.
Read how it all unfolded in Sports Mole's minute-by-minute live commentary of the action below.
REAL: Casillas; Arbeloa, Ramos, Pepe, Marcelo; Modric, Kroos, Isco; James, Ronaldo, Bale
MALAGA: Kameni; Rosales, Sanchez, Angeleri, Boka; Darder, Recio; Samu, Juanmi, Castillejo; Amrabat