Andres Iniesta sent the visitors into an early lead, but a double from Karim Benzema left Los Blancos 2-1 ahead. The first-half scoring was not finished, however, as Lionel Messi netted after 42 minutes to level at 2-2.
Madrid regained the lead in the early stages of the second period from a Cristiano Ronaldo penalty, but Barcelona leveled with a Messi spot kick after 65 minutes in an incident that saw Madrid centre-back Sergio Ramos sent from the field.
Barcelona pushed for a winner in the latter stages and moved ahead five minutes from time when Messi converted his second penalty of the night to register a hat-trick in the Bernabeu.
Read how it all unfolded in Sports Mole's minute-by-minute live commentary of the action below.
MADRID: Lopez; Carvajal, Pepe, Ramos, Marcelo; Alonso, Modric, Di Maria; Bale, Benzema, Ronaldo
BARCA: Valdes; Alves, Pique, Mascherano, Alba; Xavi, Busquets, Fabregas; Neymar, Messi, Iniesta
#FCB have scored in each of their last 11 trips to the Bernabeu in all competitions; they last failed to score in Oct 06 (2-0 in La Liga).— Betfair Exchange (@BetfairSports) March 23, 2014
1 - Neymar both scored and assisted on his Clasico debut earlier in the campaign. Confidence.— OptaJose (@OptaJose) March 23, 2014