Sergio Ramos made amends for his untimely own goal last week at Sevilla by scoring twice as Real Madrid bounced back from two successive defeats to beat Málaga 2-1 on Saturday and move four points clear at the top of La Liga.

The Real Madrid captain headed his side in front in the 35th minute by powering Toni Kroos’s outswinging corner beyond Carlos Kameni and struck again in the 43rd when he slid in a free-kick from his German team-mate from close range to net his third goal in four games.

It was the perfect response from the Spain international six days after he had put through his own net against Sevilla and inadvertently helped his former side win 2-1 to halt Real’s remarkable 40-game unbeaten run.

Ramos has now scored six league goals this season, bettering his previous record of five in a season with still half the campaign to go.

Málaga had proved difficult opponents and a slip by Raphaël Varane allowed the Venezuela international Juanpi to pull a goal back in the 63rd minute. It took a good save from Keylor Navas to prevent Chory Castro from levelling moments later.

The Uruguayan Castro had hit the post for Málaga and forced another impressive save from Navas in an action-packed first half in which Cristiano Ronaldo and Karim Benzema squandered clear chances for Real.

Ronaldo’s frustration grew after the break when he struck a post and was twice denied by Kameni, who almost committed an embarrassing error when he allowed a back pass to trickle through his legs but managed to scramble it away before it crossed the line.

Real top the table on 43 points, four clear of Sevilla and five ahead of champions Barcelona, having played 18 games. Barcelona visit Eibar on Sunday while Sevilla travel to Osasuna.