Lionel Messi scored his 500th Barcelona goal to send the Catalans top of La Liga with a last-minute winner against 10-man Real Madrid at the Bernabeu.
It puts Barcelona level on points with Real Madrid, but with a better head-to-head record.
Casemiro scored first for the hosts before Messi and Ivan Rakitic put Barcelona in front and Sergio Ramos was shown a red card for a wild lunge.
Substitute James Rodriguez thought he had earned Madrid a point late on.
But Messi, who scored his first with a superb jinking run and finish away and fired in from the edge of the area to win it for Barcelona.
Both Messi and Cristiano Ronaldo had earlier missed good opportunities to give their sides the lead, with the Argentina international poking wide of an open goal before the break and the Real Madrid forward slicing over in the second half.
Madrid – who have a game in hand on Barcelona – also felt they should have had a penalty when Ronaldo was clipped by Samuel Umtiti after only two minutes.
Reaching the Champions League quarter-finals and competing to win La Liga would hardly constitute a crisis for most clubs, but this is Barcelona.
Trophies are often the minimum requirement for those in charge at Nou Camp. Fans expect to see their side win in style and have questioned the merits of boss Luis Enrique, who is to leave at the end of the season.
The travelling Catalan contingent could not complain about Sunday’s heroics, however, as they were treated to two fine finishes from Messi that were complemented by an equally composed Rakitic strike from the edge of the area.
Any crisis talks can be postponed while this side continues to boast Messi in its ranks, with the little magician showing he still has the ability to carry the Blaugrauna against the world’s best teams.
A genius with the football at his feet, Messi continued to be the creative spark for Barcelona even after Casemiro – lucky not to be sent off himself – had twice scythed the forward down and an innocuous Marcelo elbow left the Argentine with a bloodied mouth.
His reward, as well as outshining Real Madrid counterpart Ronaldo in this Classico, was to further ingrain his name into Barcelona folklore.
Breakdown of Messi’s 500 goals
Some 343 of Lionel Messi’s 500 Barcelona goals have come in La Liga. He has notched 94 in the Champions League and 43 in the Spanish Cup. His other 20 have come in other tournaments, like Super Cups and Club World Cups.
So what does this all mean for the La Liga title race?
Barcelona are top on virtue of their head-to-head record with Real Madrid (you can basically ignore the goal difference now as head-to-head is what matters in La Liga).
But it’s still Real Madrid’s title to lose.
Zinedine Zidane’s side have a game in hand against Celta Vigo (yet to be arranged) – but they also have to juggle their La Liga run-in with a Champions League semi-final against Atletico, so it’s not a given that they’ll win their last six games. BBC