MADRID (AP) — Lionel Messi scored his 500th career goal for Barcelona to give the Catalan club a dramatic 3-2 win in injury time against 10-man Real Madrid in the "clasico" on Sunday, leaving the Spanish league title race wide open.
Messi netted his milestone goal — his second of the night — with a low left-foot shot from inside the area after a cross by Jordi Alba two minutes into stoppage time.
That goal left the two rivals level at the top on 75 points. Barcelona leads on the head-to-head tiebreaker but Madrid has six games left — one more than Barcelona.
It was the second consecutive win by Barcelona at the Santiago Bernabeu Stadium, coming after a 4-0 rout last season that put Madrid in crisis and eventually led to the replacement of coach Rafa Benitez by Zinedine Zidane.
This year's victory could keep Madrid from winning the league title for the first time since 2012, and give the Catalan club its third straight La Liga trophy.
"We can't be happy," Zidane said. "When you don't put the game away, things like this can happen. We are disappointed because we didn't deserve to lose."
It was another outstanding performance by Messi, who played part of the game with a bloodied mouth after colliding with Madrid left back Marcelo's elbow.
"He is the best player in history," Barcelona coach Luis Enrique said of Messi. "He makes the difference."
Messi's winner at the Bernabeu came after Sergi Roberto made a great run from Barcelona's defense, leading to Alba's low pass across the area as Messi came charging to one-touch the ball into the corner past the diving Keylor Navas.
Messi's first goal came after he got past Luka Modric and Dani Carvajal with a run inside the area after picking up a pass by Ivan Rakitic outside the box in the 33rd.
Messi is the all-time leading scorer in the clasico with 23 goals.
He has scored 14 goals in his last 10 league matches, and is the competition's leading scorer with 31 goals, seven more than teammate Luis Suarez. The Argentine playmaker has 47 goals with Barcelona in 46 games this season.
It was a thrilling match at the Bernabeu, with the teams attacking from the start and giving both goalkeepers plenty of work.
Casemiro had put the hosts ahead from close range after Sergio Ramos struck the post in the 28th. After equalizing five minutes later, Messi also helped set up Barcelona's go-ahead goal by Rakitic in the 73rd, a powerful left-footed shot from outside the area.
Ramos was sent off with a straight red card in the 77th after a foul on Messi to stop the playmaker from a one-on-one situation in a breakaway. Despite that, Madrid still found the strength to equalize in the 85th with substitute James Rodriguez. He redirected a cross by Marcelo only three minutes after he had entered the match to replace Karim Benzema.
"We weren't smart after we equalized," Zidane said. "We thought we could score the third goal, but it's dangerous to press up front when you are playing with 10 men."
Navas made three remarkable saves in the second half alone — on a close-range header by Gerard Pique, a shot by Luis Suarez and another strike by Pique.
Barcelona's Marc-Andre ter Stegen also came up with big stops, including a header by Benzema and a shot by Marco Asensio.
"It was a match between two teams that went for the victory," Luis Enrique said. "Either one could have won it."
Cristiano Ronaldo had a few good chances but was not able to capitalize on them.
Madrid forward Gareth Bale, who was doubtful before the game, came off the field injured again in the 39th.
Ramos left the pitch exchanging words with Pique, adding to the ongoing spat between the veteran Spain defenders.
Wearing the green jacket from his first career major victory at Augusta earlier this month, Masters champion Sergio Garcia performed the honorary kickoff before the game.
REAL SOCIEDAD 1, DEPORTIVO LA CORUNA 0
Brazilian striker Willian Jose scored in the first half and Real Sociedad held on to victory over Deportivo La Coruna to stay in contention for a Europa League spot next season.
Jose netted the winner with a header into the top corner in the 28th minute at Anoeta Stadium, moving host Real Sociedad into sixth place with five rounds to go.
Real Sociedad opened a two-point gap on seventh-placed Athletic Bilbao, which plays at Eibar on Monday.
CELTA VIGO 0, REAL BETIS 1
Celta Vigo followed its qualification for the semifinals of the Europa League with a home loss against Real Betis.
Darko Brasanac scored a 54th-minute goal for the visitors, which moved further away from the relegation zone with their second consecutive victory.
Celta stayed in 10th place.
LAS PALMAS 1, ALAVES 1
Kevin-Prince Boateng scored in the 44th minute for Las Palmas and Ibai Gomez equalized in the 61st as Las Palmas and Alaves played to a draw that kept both teams near the middle of the table.
Tales Azzoni on Twitter: http://twitter.com/tazzoni