A depleted Real Madrid side defeated Real Sociedad 3-1 at Anoeta on Sunday.
The hosts went into the game, having won all three of their previous league fixtures, but Zinedine Zidane’s men rose to the challenge, despite being without Cristiano Ronaldo, Karim Benzema and Marcelo.
Borja Mayoral opened scoring in the 19th minute, after fine work from captain Sergio Ramos.
Kevin Rodrigues converted a deep right-wing cross, with a left-footed volley that squirmed under Keylor Navas, to level the scores.
Mayoral then forced an own goal, before Gareth Bale wrapped up the win with a breakaway goal.
With the win, Madrid avoided dropping points for the third consecutive La Liga game. They are now in 4th place with eight points.
Barcelona remain top of the league with 12 points after four games.