Real Madrid beat Deportivo Coruna 2-1 in a fast and furious game at the Bernabeu on Sunday to extend their perfect home league record and stay two points clear at the top of the table.
Ronaldo put Real ahead in the final minute of the first half but Deportivo hit back in the 63rd minute when Walter Pandiani scored within 15 seconds of coming on as a substitute.
Real, needing to win to stay clear of Valencia at the top, got the winner five minutes from time when Raul turned in a cross from Roberto Carlos.
The result gave Real 36 points from 16 matches and kept them two points ahead of Valencia, who had briefly gone top after winning 1-0 away to Real Betis with an own goal from Juanito.
Deportivo stay third, now six points behind the leaders, with Osasuna fourth on 27 points after a goalless draw away to Racing Santander.
Osasuna could, in fact, find themselves two points better off, after Racing briefly exceeded the limit on non-European Union players in their side.
Coach Lucas Alcaraz quickly rectified the situation but in recent years the Spanish Football Federation have punished similar slip-ups by awarding victory to the opposing side.
Real's eighth successive home league win since the start of the season came courtesy of two precise close-range finishes from strike partners Ronaldo and Raul.
Deportivo had the best chance in a fast-paced first half, with unmarked midfielder Juan Carlos Valeron blasting over when the ball broke to him in the area from a free kick after 20 minutes.
Moments later Deportivo forward Albert Luque crashed a volley into the back of the net only to be ruled offside.
Ronaldo squandered two clear opportunities in the first half an hour, smacking a shot directly at Depor keeper Francisco Molina from close range and then firing high and wide after Zinedine Zidane's pass had split the visiting defence.
The breakthrough came in the final minute of the first half when Zidane controlled Ivan Helguera's lofted pass with two deft touches of his right foot and crossed with his left for Ronaldo to side-foot the ball past Molina at the far post.
The tempo of the game dropped in the second half until Deportivo brought on Uruguayan striker Pandiani, who made a dramatic impact.
After just a few seconds on the pitch he controlled a Valeron pass and slotted the ball neatly past Iker Casillas. Real raised their game and twice came close to retaking the lead through Zidane and Ronaldo.
A second goal finally arrived five minutes from the end when Roberto Carlos exchanged passes with Zidane out wide on the left and crossed for an unmarked Raul to touch the ball past Molina.