Sergio Ramos struck twice to get Real Madrid back to winning ways as the home fans targeted Cristiano Ronaldo in a 2-1 victory over Malaga at the Santiago Bernabeu on Saturday. The European champions' 40-game unbeaten run had come to a crashing halt with back-to-back defeats to Sevilla and Celta Vigo in the past week, but after a nervy start skipper Ramos ensured they opened up a four-point gap at the top of the table.
The Spanish international opened the scoring with a towering header from a Toni Kroos corner on 35 minutes.
And Ramos soon took his career tally to 50 La Liga goals by bundling home another Kroos delivery despite standing in an offside position.
Juanpi got Malaga back into the game just after the hour and they could even have snatched a point but for a fine save from Keylor Navas to deny Chory Castro soon after.
However, victory came at a cost with Marcelo and Luka Modric limping off injured just four days before Real attempt to overturn a 2-1 Copa del Rey quarter-final first-leg deficit at Celta Vigo.
Second-placed Sevilla and Barcelona, a further point adrift in third, can close the gap when they travel to Osasuna and Eibar respectively on Sunday.
Whilst Ramos was riding to Real's rescue, off-colour Ronaldo endured another afternoon to forget in front of goal and was even whistled by the Madrid fans early on after a sluggish start to 2017.
Ronaldo shot straight at Carlos Kameni with just the Cameroonian to beat and Karim Benzema headed over as Madrid started brightly.
"Sometimes when you have difficulties you need the fans' help and to be behind you," said Madrid boss Zinedine Zidane.
"I am not going to criticise the fans because they pay their money. But with so many games and a lot of injuries, the players need to feel that love sometimes. The coach does too."
The hosts suffered their first injury blow when left-back Marcelo limped off with a thigh problem midway through the first half.
Malaga nearly compounded that loss when Castro's driven effort came back off the post before Ignacio Camacho was also inches away from giving the visitors the lead when his back-post header flew across the Madrid goal.
Ramos looked to have settled Real's nerves when he leapt highest to power home Kroos's outswinging corner 10 minutes before the break.
And eight minutes later Ramos had his eighth goal of the season, albeit in scrappier fashion, as he appeared to be offside when tapping home Kroos's low free-kick.
Malaga are yet to register a point in three games under new boss Marcelo Romero since former Tottenham Hotspur manager Juande Ramos's surprise December resignation.
Yet they didn't let their heads go down and were back in the game 18 minutes into the second half when Juankar's initial effort was well saved and Juanpi tucked home the rebound.
Seconds later Navas was called into action to prevent Malaga equalising as Castro tore through the Madrid defence and his powerful effort was turned to safety by the Costa Rican.
At the other end Kameni nearly gifted Real the breathing space they craved as a harmless backpass rolled under his foot, but he recovered just in time to clear off the line and then deny Ronaldo's follow-up effort.
And a frustrating afternoon for Ronaldo was rounded off 14 minutes from time when his sweetly struck volley came back off the post before Kameni got down low to again deny the reigning World Player of the Year for a third time.
Elsewhere, Valencia further eased their relegation fears by registering a second successive league win for the first time this season in upsetting Villarreal 2-0 at the Ceramic Stadium.
Carlos Soler and Santi Mina got the goals before half time as Valencia jumped up to 15th, now seven points clear of the relegation zone.
Villarreal remain sixth, but could lose farther ground on the top four with Atletico Madrid and Real Sociedad also in action on Sunday.