Federico Valverde's fifth-minute opener was cancelled out by Ansu Fati three minutes later in a thrilling first half at Camp Nou, in which Lionel Messi and Karim Benzema missed chances to put their sides ahead before the break.
The game swung on a controversial penalty decision; after VAR ruled he had been fouled by Clement Lenglet, Sergio Ramos scored from the spot in the 63rd minute. Luka Modric added a third Madrid goal late on.
Ronald Koeman took the bold decision of starting with three teenagers: Fati (17), Pedri (17) and Sergino Dest (19). Two of them were particularly impressive. Fati scored his fifth of the season and Dest delivered once again in both defence and attack. Despite this defeat, there were reasons to be positive about the future.
Sergio Busquets looked completely out of shape and midfield is a real sore point for Barca at the moment. The two-man midfield of Busquets and De Jong was overrun by Madrid.
The loss, in all fairness, reflects where Barca are right now. They are a team in evolution, phasing out older players and bringing in younger players, and they were beaten by a more solid side here.
Manager rating out of 10
5 -- Koeman deserves credit for his starting line-up, picking players in form regardless of age. However, he waited too long to make any changes. He eventually made a triple substitution in the 80th minute and a fourth change five minutes later but there was no plan or intelligence to his move. He just chucked on a load of forwards and hoped for the best.
Player ratings (1-10; 10 = best. Players introduced after 70 minutes get no rating)
DF Sergino Dest, 8 -- Showed some brilliant trickery in attack and linked well with Pedri on the right, but also delivered at the back. Made one brilliant challenge on Casemiro.
DF Gerard Pique, 6 -- Left too much space behind home for Madrid's opening goal but didn't do too much wrong in the game.
DF Clement Lenglet, 4 -- Will complain about the penalty but he made it easy to be given by grabbing Ramos' shirt.
DF Jordi Alba, 6 -- Did well going forward, setting up the Barca goal, but needed covering at the back on several occasions.
MF Sergio Busquets, 3 -- One of his worst performances in years. Lost Valverde for the first goal and gave the ball away too much.
MF Frenkie de Jong, 6 -- Had a difficult task in the middle. Made a couple of driving runs but wasn't as effective as Barca need him to be.
FW Pedri, 6 -- The teenager was the surprise pick in Koeman's side and did OK, although was lacking a bit of confidence at times.
FW Philippe Coutino, 5 -- Unable to influence the game from the left. Took too long on the ball when he did have it and missed a great headed chance.
FW Ansu Fati, 7 -- Took his goal really well and his running from a central position posed Barca's biggest threat.
FW Lionel Messi, 6 -- Full of running, tracking back to help in defence, and also useful in attack. Missed his best chance, though, firing straight at Thibaut Courtois.
FW Antoine Griezmann, NR -- Should have come on immediately after Ramos' equaliser, not 20 minutes later.
FW Ousmane Dembele, NR -- Had a couple of chances to use his pace on the left but lacked a final ball.
FW Francisco Trincao, NR -- Hardly touched the ball after coming on.
FW Martin Braithwaite, NR -- Thrown on in desperation more than anything in the 85th minute.