Pierre-Emerick Aubameyang scored twice on his El Clasico debut as Barcelona stunned La Liga leaders Real Madrid at the Bernabeu.
Aubameyang headed the visitors in front in the 29th minute and scored their final goal early in the second half.
Ronald Araujo doubled Barca's advantage before the break, with Ferran Torres adding a third on the counter-attack after 47 minutes.
Real Madrid were seeking a sixth straight win in this fixture, but looked uninspired and created little as their lead over Sevilla at the top remained at nine points.
Xavi's Barcelona stretched their unbeaten run to 12 games and rose up to third in the table, 12 points behind Real with a game in hand.
Aubameyang adds momentum to Xavi revolution
Barcelona have looked a completely different proposition since Xavi replaced Ronald Koeman in November, only losing once in La Liga in that time - and that defeat was more than three months ago.
Their winter signings from the Premier League have transformed them too, Aubameyang from Arsenal, Torres from Manchester City and Adama Traore from Wolves.
Only Memphis Depay (10 goals) has scored more than Aubameyang (nine) and Torres (five) for Barcelona this season.
It is surely too late for a title challenge, but this landmark result shows Barca are back - and could be in contention for the big trophies next season.
They blew Real Madrid away for their first Clasico win in three years and biggest league win at the Bernabeu since 2015. The impressive Ousmane Dembele set up the opening two goals, headers by Aubameyang and Araujo.
Araujo had been chosen to start at right-back instead of Dani Alves to deal with the threat of Vinicius Jr, but ended up on the scoresheet himself.
Aubameyang set up Torres with a delightful backheel pass and chipped in their fourth himself, a goal initially ruled out for offside but given by the video assistant referee.
They wasted many chances to score more, with Aubameyang and Torres having six shots each.
Madrid suffer without Benzema's brilliance
Real boss Carlo Ancelotti will just hope this is a blip.
They were missing the injured Karim Benzema, who has been the outstanding player in La Liga this season with 22 goals and 11 assists.
Real might not have expected to have missed him quite this much though. They started without a recognised striker but Mariano Diaz's half-time introduction did not make things any better.
It would have been even worse for Real if not for Courtois, who made six saves.
Most of the home side's chances came after the scoreline was 4-0 and Barca had missed several attempts for a fifth. David Alaba forced a good save from Marc-Andre ter Stegen in one of the better opportunities.
It is not time to panic though. This was only their third league defeat all season and they are still in control of the title race.
Line-ups
Real Madrid
Formation 4-2-4-0
1Courtois
2Carvajal3Militão4Alaba6Nacho
14Casemiro8Kroos
21Rodrygo10Modric15Valverde20Vinícius Júnior
1Courtois2CarvajalSubstituted forMarianoat 45'minutes3Militão4Alaba6NachoSubstituted forVázquezat 63'minutesBooked at 88mins14Casemiro8KroosBooked at 22minsSubstituted forCamavingaat 45'minutesBooked at 82mins21RodrygoSubstituted forAsensioat 63'minutes10ModricBooked at 63mins15Valverde20Vinícius JúniorSubstitutes
5Vallejo7E Hazard11Asensio12Marcelo13Lunin16Jovic17Vázquez19Ceballos22Isco24Mariano25Camavinga45Piñeiro del ÁlamoBarcelona
Formation 4-3-3
1ter Stegen
4Araújo3Piqué24García18Alba
21de Jong5Busquets16González López
7Dembélé25Aubameyang19Torres
1ter Stegen4Araújo3Piqué24García18AlbaBooked at 74minsSubstituted forAlves da Silvaat 86'minutes21de JongBooked at 26minsSubstituted forPaez Gaviriaat 71'minutes5BusquetsBooked at 31mins16González LópezSubstituted forGonzález Iglesiasat 86'minutesBooked at 88mins7DembéléSubstituted forTraoréat 80'minutes25AubameyangSubstituted forDepayat 71'minutes19TorresSubstitutes
6Puig Martí8Alves da Silva9Depay11Traoré12Braithwaite13Murara Neto14González Iglesias15Lenglet17de Jong22Mingueza30Paez Gaviria36TenasReferee:Juan Martínez MunueraAttendance:60,017Live Text
Match ends, Real Madrid 0, Barcelona 4.
Second Half ends, Real Madrid 0, Barcelona 4.
Corner, Barcelona. Conceded by David Alaba.
Attempt blocked. Adama Traoré (Barcelona) right footed shot from the right side of the box is blocked.
Attempt blocked. Luka Modric (Real Madrid) left footed shot from outside the box is blocked.
Foul by Dani Alves (Barcelona).
Marco Asensio (Real Madrid) wins a free kick on the right wing.
Nico González (Barcelona) is shown the yellow card for a bad foul.
Lucas Vázquez (Real Madrid) is shown the yellow card for a bad foul.
Gavi (Barcelona) wins a free kick in the attacking half.
Foul by Lucas Vázquez (Real Madrid).
Foul by Nico González (Barcelona).
Eduardo Camavinga (Real Madrid) wins a free kick in the defensive half.
Foul by Nico González (Barcelona).
Eduardo Camavinga (Real Madrid) wins a free kick in the attacking half.
Substitution, Barcelona. Nico González replaces Pedri.
Substitution, Barcelona. Dani Alves replaces Jordi Alba.
Attempt missed. Lucas Vázquez (Real Madrid) left footed shot from the centre of the box misses to the right.
Corner, Real Madrid. Conceded by Gerard Piqué.
Foul by Sergio Busquets (Barcelona).