Ahead of the senior teams meeting this weekend, the two sides’ Under-12 squads faced off.
But controversy hit after Real’s youngsters took the lead.
As the team rushed to the corner flag – where they were joined by their own goalkeeper – Barcelona saw what they thought was an opportunity to immediately hit back.
They took a quick kick-off, with one player running straight to the goal, where he tapped the ball into an empty net.
The goal was correctly disallowed by the referee and Barcelona later apologised to Real for the unsporting behaviour shown during the incident.
Writing about the event on social media, Real Madrid said: “The rivalry is demonstrated on the pitch. Afterwards, we are friends.
“Before the shirt, we are people.
“Today, it was us, another time, it will be them. But, my greatest respect to a great trainer and an even better person.”