Cristiano Ronaldo's first-half score was the only difference between Real Madrid and Malaga as Carlo Ancelotti's side claimed a 1-0 win at Estadio La Rosaleda.
The Portugal international fired home a low strike after beating three Malaga defenders in the 23rd minute to claim a narrow victory for Real.
The result left Malaga in 13th place but only three points clear of the Primera Division relegation zone.
Atletico Madrid remained hot on the heels of Real following a 1-0 victory over Espanyol at the Estadio Vicente Calderon.
Diego Costa netted the only goal of the game as Atletico kept the pace at the top to sit three points below Real.
Rayo Vallecano climbed out of the relegation zone by comfortably beating fellow strugglers Almeria 3-1 to record their third straight league win.
Alberto Bueno gave the hosts the lead on 37 minutes and Joaquin Larrivey extended the advantage 20 minutes later. Fernando Soriano then gave Almeria a brief glimmer of hope with a powerful finish, but Larrivey struck again to secure another vital victory for Paco Jemez's side.
Celta Vigo took a big step towards securing their survival with a narrow but vital 1-0 victory at Levante.
Nolito scored the only goal of the game after 19 minutes and Celta were fortunate not to lose their lead in the second half, with Levante's David Barral missing a penalty and then having a shot blocked on the line by Celta goalkeeper Yoel Rodriguez, although it looked as if it may have crossed.