Pierre-Emerick Aubameyang, who scored twice and also grabbed an assist in the game, was the mastermind behind Los Blancos’ collapse.
With both assists coming from Ousmane Dembele, the Gabonese took the lead with a close-range header, and Ronald Araujo added a second in the first half.
Ferran Torres converted Aubameyang’s backheel early in the second half, then the former Arsenal man topped it off with a superb strike that was validated by VAR after being ruled out for offside earlier.
Xavi’s first trip to the Bernabeu as a manager went perfectly, with an emphatic victory over the LaLiga leaders – Real Madrid.
With a nine-point advantage at the top of the standings, Madrid will return to LaLiga action on April 2 away from home against Celta Vigo after the international break.
While on April 3, Barcelona’s prospects of finishing in the top four will be put to the test once more when they face Sevilla.