Updated

Lionel Messi scored again – but Cristiano Ronaldo responded.

Ronaldo's late penalty canceled out Messi's score and 10-man Real Madrid rallied for a 1-1 tie against Spanish leader Barcelona on Saturday in the first of their four matchups in 18 days.

Ronaldo cleanly beat goalkeeper Victor Valdes in the 82nd minute for his first career goal against Barcelona after Daniel Alves was judged to have brought Marcelo down inside the area.

Ronaldo and Messi have been battling to be the top scorer in La Liga all season.

Messi scored his 49th goal of the season from the spot in the 53rd to put the visitors ahead at Santiago Bernabeu Stadium after Madrid defender Raul Albiol was red-carded for tugging striker David Villa down inside the area.

Madrid got points against its biggest rival for the first time in six games but remained eight points behind the two-time defending champions with six rounds left.

"We're not champions yet with 18 points still up for grabs," Barcelona coach Pep Guardiola said.

Madrid was in danger of starting the first of four "clasicos" against its historic rival with defeat after Albiol's sending off deflated a first 50 minutes in which coach Jose Mourinho's defensive tactics had largely stymied Barca.

"Eleven against 10 and it was practically mission impossible. Especially against a team that — with possession of the ball — are the best in the world," said Mourinho, who has faced Barcelona with one less player before as coach of Chelsea and Inter Milan.

"I'm tired of having to prepare for Barcelona games with 10 men."

While the result was unlikely to improve its chances of denying Barcelona a third straight league trophy, Madrid can go into Wednesday's Copa del Rey final at Valencia with momentum after erasing memories of November's 5-0 loss at Camp Nou. The two Spanish giants also have a two-game Champions League semifinal to play.

"You always learn something for the next game. We will learn what we have to do to attack a little bit better," Guardiola said. "We should have attacked (Iker) Casillas' goal more when it was 1-0 but its natural to sit back some when you're in the lead."

Even the normally quiet Messi let out a cry of "Vamos!" after scoring the opener, his league-leading 30th goal. It gave him 49 in all games this season, moving him one shy of becoming the first Spanish league player to reach the half-century mark.

It was the Argentina international's first goal against Mourinho-coached clubs.

"We drew and nearly won but, with the circumstances of the game, it's a draw you have to be happy with," Mourinho said.

The Associated Press contributed to this report.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino