Clinical Real Madrid beat Barcelona in the 250th El Clasico to go top of La Liga and inflict their rivals’ first league defeat of the season.
Karim Benzema scored Real’s opener after Vinicius Jr’s shot had been saved into his path by Marc-Andre ter Stegen.
Federico Valverde doubled the champions’ lead before half-time with a lovely 20-yard drive.
Ferran Torres pulled one back from Robert Lewandowski’s flick-on but Rodrygo settled it with a penalty.
The rivals started the day with seven wins and a draw from their opening eight games – but Real go three points clear now as they remain unbeaten.
This was a first away La Liga defeat in almost a year in charge of Barcelona for Xavi.