Lionel Messi blew the La Liga title race wide open as his 500th Barcelona goal stunned Real Madrid by giving the Catalans a 3-2 El Clasico win at the Bernabeu.
Messi -- sporting a black eye and missing teeth following Marcelo's first-half challenge on him -- struck twice with his winner coming from the last kick of the match.
Ivan Rakitic had earlier given Barcelona a 2-1 lead, while Casemiro and James Rodriguez were on target for hosts Real, who had skipper Sergio Ramos sent off 13 minutes from time for a two-footed challenge on Messi.
Barcelona go top because they have a better head-to-head record than Real, although Zinedine Zidane's men have a game in hand and therefore six matches left to play to the Catalans' five.
In an end-to-end contest, Real took a 28th-minute lead when Ramos hooked his shot against the post and Casemiro slid the rebound into an empty net.
But Barcelona were level within five minutes when Rakitic's pass picked out Messi and the Argentinian swerved past Dani Carvajal to finish unerringly past Keylor Navas.
Gareth Bale was forced off through injury on his 100th La Liga appearance, but that was a rare stop in the action with both Marc-Andre ter Stegen and Navas making excellent stops.
But Navas had no chance keeping out Rakitic's 73rd-minute piledriver and it got worse for Real when Ramos received a Clasico red card for the second successive season.
The challenge on Messi did not make contact with the Barcelona player, but the two-footed tackle was wild and reckless and worthy of a straight red card.
Rodriguez, who had only been on the pitch three minutes, looked as if he had handed Real a point when he converted Marcelo's cross from close range.
But then Messi met Jordi Alba's cross from eight yards out to find the bottom right-hand corner of Navas' net.
Willian Jose headed the only goal as Real Sociedad boosted their hopes of qualifying for the Europa League with a 1-0 success over Deportivo La Coruna.
The Brazilian striker connected powerfully with Yuri Berchiche's 28th-minute cross to direct his 11th league goal of the season into the top-left corner.
Victory for Sociedad moves them to sixth in the table, two points above Basque rivals Athletic Bilbao ahead of the latter's clash with near-neighbours Eibar on Monday.
Real Betis took advantage of Celta Vigo resting several regulars after reaching the Europa League semi-finals to almost certainly end their relegation fears with a 1-0 win at Balaidos.
Darko Brasanac's brave 54th-minute diving header gave Betis a deserved victory, the Serbian's first goal for the club, as a lethargic Celta side created little.
Alaves owed their 1-1 draw at Las Palmas to Ibai Gomez's controversial second-half equaliser.
Las Palmas took the lead a minute before half-time when Kevin-Prince Boateng fired home Tana's pass for his 10th goal of the season.
Alaves produced a shock 61st-minute equaliser when Gomez's shot was allowed to stand, despite the clearly offside Deyverson obstructing the view of goalkeeper Raul Lizoain.
Las Palmas were reduced to 10 men three minutes from time when substitute Marko Livaja was shown a straight red card for a dangerous challenge on Marcos Llorente.