BARCELONA, Spain (AP) -- Rivals Barcelona and Real Madrid showed Sunday that they don't need titles at stake to produce a thrilling game of football.
With Barcelona already Spanish league champion and Madrid focused on its Champions League final later this month, it was supposed to be the most low-key "clasico" in years.
Instead, the Camp Nou was treated to a heated contest and four goals, including Lionel Messi's strike which ensured 10-man Barcelona salvaged a 2-2 draw and remained undefeated in the league this season.
When asked if the match had lived up to its "decaffeinated" billing, Barcelona coach Ernesto Valverde said: "Decaf? It had extra caffeine. Both sides always want to win a game like this."
Ronaldo added a goal of his own and gave Madrid's fans a scare when he couldn't play on through a leg injury and needed to be substituted at halftime.
Ronaldo hurt his lower right leg while canceling out Luis Suarez's opener in the 10th minute.
Madrid was dominating the match when Barcelona right back Sergi Roberto was shown a direct red card in first-half injury time for swiping his hand at Marcelo's face as tempers flared.
But Messi came to the hosts' rescue, sending the ball past Keylor Navas in the 52nd to swing the match back in Barcelona's favor despite playing a man down.
Messi was stopped by goalkeeper Keylor Navas from scoring again and Gareth Bale pulled Madrid level in the 72nd after curling in a pass by substitute Marco Asensio.
Madrid coach Zinedine Zidane said that he wasn't worried about Ronaldo being able to play in the Champions League final against Liverpool on May 26.
"He doesn't feel good now, but I don't think it is anything serious," Zidane said. "We will have him ready (to play)."
Barcelona stayed unbeaten through 35 league matches this season and extended its record run to 42 consecutive games without a loss.
Barcelona has three matches left to become the first team to go unbeaten in the competition since the 1930s, when it consisted of 10 teams compared to 20 now.
"Our quest continues to finish the league without a loss," said Andres Iniesta, who played his 38th and final game against Madrid before he leaves the club after 16 seasons this summer.
Even though nothing was at stake, both teams played with all the emotion of a final.
While Madrid played its best after Suarez briefly put Barcelona ahead, Barcelona regrouped after Roberto was sent off.
Suarez started and finished off a quick attack when he played Roberto clear down the hole left by Marcelo on the right flank. Roberto returned a cross for the striker to sweep in with his right foot after Messi had drawn in two defenders with a run to the near post.
The joy at Camp Nou was short-lived. A missed tackle by Sergio Busquets left Toni Kroos to start a counterattack that Ronaldo completed by sending a headed pass by Karim Benzema over the line to equal Alfredo Di Stefano's club record of 18 goals against Barcelona.
Ronaldo paid a price for the goal with Gerard Pique stepping on his ankle as he unsuccessfully tried to stop the Madrid forward from scoring.
Ronaldo appeared to shake off the injury. He led Madrid's push forward and was only stopped when Marc-Andre ter Stegen closed out to block his shot.
Barcelona began to lose its composure and Jordi Alba shoved Luka Modric before both Suarez and Sergio Ramos were booked for a tussle.
Messi earned himself a yellow for a hard tackle on Ramos before Roberto responded to Marcelo's bump from behind by slapping at his face. Marcelo fell down and the referee didn't hesitate in flashing the red card.
But halftime changed everything.
Ronaldo stayed on the bench and, without its star, Madrid couldn't impose its numerical advantage.
Suarez won the ball back from Raphael Varane after a side-to-side collision and passed to Messi, who used a blistering strike of his left boot to drive the ball just inside the post.
That goal took Messi's clasico record to 26 goals.
Messi looked poised to get another goal but Bale made it 2-2 by using one touch to curl Asensio's pass around Ter Stegen. With most of the players visibly tired and struggling to recover on defense, both sides had chances to get the win.
Barcelona's players held an impromptu celebration on the pitch for the result and its domestic double, with the coaching staff giving them the guard of honor that Madrid's players declined to do before kickoff.
Atletico Madrid lost 2-0 to Espanyol for its first home defeat of the league season.
Alaves routed Malaga 3-0, and Getafe beat Las Palmas 1-0.