It was a similar story for second-placed Atletico Madrid as they remained three points behind the leaders with a 1-0 victory over Espanyol at the Vicente Calderon thanks to Diego Costa’s second-half winner.
Ronaldo made the breakthrough with a resounding finish from the edge of the area midway through the first-half and was only denied from adding to his tally by a series of saves from Willy Caballero.
Malaga pushed hard for an equaliser in the final quarter, but couldn’t find a way through as they remain just three points above the relegation zone.
Real now lead third-placed Barcelona by seven points, but the Catalans can cut that gap when they host Osasuna on Sunday.
And with Real and Barça set to meet in El Clásico next weekend at the Santiago Bernabeu, midfielder Xabi Alonso underlined the importance of consolidating their advantage.
“It is a very important three points,” Alonso told Canal Plus. “There is one less game to play and now we will focus on Tuesday and then Sunday.”
“We will have to see what happens tomorrow to see if they cut the gap. We have ten games to go and we need to play them all like it is the last one.
“I don’t think the Clásico will be decisive, but it is very important.”
Real boss Carlo Ancelotti, meanwhile, hailed his side’s attitude despite not having their best day in front of goal.
“It was a difficult game because Malaga pressed a lot for the whole game,” Ancelotti said.
“We had chances to score the second goal but unfortunately we weren’t able to get it and then when the score is 1-0 you always suffer.
“It wasn’t a great game in terms of how we played, but we showed good attitude and were very solid defensively. We didn’t concede any opportunities, so it is a good and very important result.”
The only goal of the game arrived on 22 minutes when Ronaldo collected Gareth Bale’s crossfield pass and cut inside two Malaga defenders before thumping a right-footed shot into the bottom corner.
The Portuguese captain could then have added to his tally twice in quick succession as he forced Caballero into a fine low save before volleying a lovely cross from Bale wide at the far post.
In trying to reach the ball for the second chance, though, Ronaldo clashed with team-mate Karim Benzema and the Frenchman had to be replaced by Angel di Maria after failing to recover from a knock to the thigh.
Di Maria created the first clear opening of the second period as well with a fantastic run inside his own half before teeing up Isco, but he wastefully fired over with just Caballero to beat.
Malaga’s best chance to equalise came 15 minutes from time, but unfortunately for Bernd Schuster’s men it fell to centre-back Sergio Sanchez and he blasted well wide of the target when well-placed inside the area.
Atletico edge Espanyol
At the Calderon, Atletico showed some signs of a European hangover after beating AC Milan to qualify for the quarter-finals of the UEFA Champions League for the first time in 17 years on Tuesday, but still had enough to overcome a dogged Espanyol side.
David Villa was first to threaten as his header from Jose Sosa’s free-kick was brilliantly turned behind by Kiko Casilla 15 minutes in.
Five minutes later it was Thibaut Courtois who was forced into a fine stop as the Belgian got down low to his right to parry Sergio Garcia’s deflected effort to safety.
Villa came close with another headed effort that flew just past the far post as Atletico ended the half on the front foot.
However, they had to wait until ten minutes into the second period to make the breakthrough as Costa raced onto Villa’s through ball to coolly slot home his 30th goal of the season.
Costa had another decent opening ten minutes later but he ran wide as he rounded Casilla and blazed over from a narrow angle.
Courtois sustained a nasty looking injury when he was accidentally struck on the head by Jhon Cordoba’s knee 16 minutes from time, but the Belgian continued and had to make one more crucial save to turn David Lopez’s shot three minutes later.
Elsewhere in the league, Levante were beaten at home by Celta Vigo 1-0, while Rayo Vallecano defeated Almeira 3-1 at home.