MADRID - Lionel Messi scored a hat-trick to give Barcelona a 4-3 win at 10-man Real Madrid in an electrifying and contentious "clasico" that kept the three-way La Liga title race wide open.
The result means Atletico Madrid now tops the table, with Madrid level on points in second and Barcelona a point behind in third, with nine games remaining as the title race shapes up to be the closest in years.
In a game with three penalties, a red card and a host of missed chances, Barcelona's Andres Iniesta set the tone by rocketing home an early opener, only for Karim Benzema's brace to put the hosts ahead by the 24th.
The teams went into the break level at 2-2 after Messi slotted in an equaliser, only for Cristiano Ronaldo to re-establish Madrid's lead with a 55th-minute penalty.
But Messi scored a pair of penalties after that - including the 65th-minute equaliser after Sergio Ramos was sent off - to end Madrid's 31-game unbeaten run stretching back to the previous "clasico" - the name given to any match between Real Madrid and Barcelon - in October.
"It's unusual to see so many penalties called in a 'clasico'," Barcelona fullback Jordi Alba said.
While Madrid coach Carlo Ancelotti tried to defuse tension surrounding the three penalties, Ronaldo did not.
"I don't want to say the referee favoured one team more than the other, but he favoured Barca a little more," Ronaldo said.
Earlier, Diego Costa's 23rd goal followed Gabi Fernandez's opener as Atletico beat 10-man Real Betis 2-0 and now lead Madrid on head-to-head with the city rivals level on 70 points. Barcelona is on 69 points.
"Right up until the last game, this league is wide open," Ancelotti said.
"Any of these last nine games can prove decisive."
The high pace of play and buzzing atmosphere inside the Santiago Bernabeu Stadium left little doubt this was a "clasico" with much at stake.
"You could say some of the decisions penalised us, but it doesn't change anything," Ancelotti said.
"We're not happy because we lost an important opportunity, but that's OK. We just need an immediate reaction now."
Messi climbed to No.2 on the Spanish league's all-time scoring list with 235 goals, passing Hugo Sanchez.
He also became the leading scorer in "clasico" matches with 21 goals, bettering the mark of 18 he shared with Madrid great Alfredo di Stefano.
In other 29th-round games on Sunday, Sevilla beat Osasuna 2-1 and Valencia won 2-1 against Villarreal.