The Spanish champions lost to newly promoted Cadiz last week and followed that up with another loss to Shakhtar Donetsk in the Champions League in midweek but returned to winning ways superbly against their bitterest rivals.
Real Madrid have climbed to the top of the table on 13 points while Barcelona are wallowing in 10th position with seven points.
The game started in breathtaking fashion when Karim Benzema released Federico Valverde through on goal and the Uruguayan international made no mistake, smashing the ball beyond goalkeeper Neto for the game’s opening goal in the fifth minute.
Real Madrid’s lead proved to be short-lived however as Ansu Fati wrote his name in the history books by becoming the youngest scorer in El Clasico history at the age of 17 years and 359 days, when he tucked home Jordi Alba’s cross in the eighth minute.
Thibaut Courtois came to Real Madrid’s rescue when he parried away Lionel Messi’s powerful strike in the 22nd minute.
The away side took the lead for a second time in the 63rd minute from the spot when referee Juan Martinez Munuera penalized Clement Lenglet for pulling Sergio Ramos’ shirt in the penalty box. The Real Madrid captain picked himself up following a VAR review to dispatch the spot kick in convincing fashion.
Neto denied Real Madrid a chance to extend their lead further with a string impressive stops as the game entered its final five minutes. First the he denied Toni Kroos with a brilliant double save before keeping out Ramos’ strike with his feet a minute later.
But substitute Luka Modric made sure Zinedine Zidane’s men walked away with all three points in the 90th minute when he cleverly outwitted the Barcelona defence to poke home into an empty net.