(CNN) -- Cristiano Ronaldo salvaged a point for Real Madrid in a pulsating and controversial Madrid derby Sunday to keep his side top of the three-way title race in La Liga.
Real were trailing Atletico 2-1 with eight minutes remaining when he equalized after an assist from Gareth Bale, firing home from the edge of the area.
The draw left Real three points clear of Atletico, but defending champions Barcelona closed to within a point with a 4-1 win over Almeria later Sunday.
Alexis Sanchez put them ahead after just eight minutes in the Nou Camp before Lionel Messi made it 2-0 with a stunning free kick, his eighth goal in six games.
Angel Trujillo pulled one back for the visitors and it took late goals from Carles Puyol and Xavi to seal the victory.
Atletico were looking to complete the league double over their capital rivals but were beaten 5-0 on aggregate by Real in the Copa del Rey semifinals last month.
When Karim Benzema put the league leaders in front after just three minutes from an Angel di Maria cross it looked as Los Rojiblancos would be left with red faces again, but it proved the opposite.
Sergio Ramos appeared fortunate not to concede a penalty when he tripped star Atletico striker Diego Costa but the home side were in front by half time as Koke and Gabi struck with spectacular long range efforts.
A further penalty appeal involving Costa in the second half was also turned away and home assistant coach Mono Burgos was sent to the stands for protesting.
Real pushed for the equalizer and Thibaut Courtois had to be alert again to push away Bale's flicked header.
Ronaldo might have leveled when he headed wide from a good position but he made no mistake when presented with a second opportunity in the 82nd minute.
The Portuguese star was playing his first La Liga match after serving a three-game ban for being sent off last month.
It was the 28th game unbeaten for Carlo Ancelotti's team since a 2-1 reverse to Barcelona last year and they came into the match on a high after a record 6-1 thrashing of Schalke in the Champions League.
But the draw did end a run of eight straight wins in all competitions at the Vicente Calderon stadium for Real.
"I think we can leave here reinforced, we have drawn a game in which we were losing," said Ancelotti.
"The reaction of the players was good, in general we can be satisfied because Atletico Madrid are a very good team, especially at home," he added.
In Serie A, Juventus took a bigger grip on the title with a 2-0 away win at AC Milan, leaving them 11 points clear of Roma, who were held to a goalless draw by Inter Milan Saturday.
Fernando Llorente and Carlos Tevez scored either side of halftime for the defending champions in the San Siro.
Third-placed Napoli dropped points in a 1-1 away draw at Livorno.