La Liga Wrap: Madrid rivals win as title battle heats up
Cristiano Ronaldo's 25th league goal of the season was the difference between the two sides at La Rosaleda, as Carlo Ancelotti's men continued to set the pace at the La Liga summit ahead of El Clasico against Barcelona next weekend.
After falling to a surprising 3-2 loss at Malaga last season, Real looked determined to avoid a repeat this year.
But they were still made to work hard for the win, which came via Ronaldo's precise finish in the 23rd minute, as he fired into the bottom-right corner.
The Ballon d'Or winner could have made it more comfortable when he headed narrowly wide just prior to the break, but this time he missed the target.
After their UEFA Champions League triumph against Milan in the week, Atletico looked sluggish at Vicente Calderon, with Espanyol proving to be sterner opponents than expected in their 1-0 win.
Clear chances were few and far between for long spells, with David Villa denied by visiting goalkeeper Kiko Casilla in a rare early opportunity.
But Diego Costa finally grabbed his 22nd La Liga goal of the campaign after showing a superb burst of pace to give the home side the victory they needed and keep their title bid alive.
Elsewhere, Rayo Vallecano gave their survival hopes a boost by beating fellow strugglers Almeria 3-1 at Estadio de Vallecas.
Alberto Bueno and Joaquin Larrivey put the hosts 2-0 up by the hour mark and although Fernando Soriano pulled one back, Rayo killed the game off 13 minutes from the end when Larrivey netted his second of the match.
That ended Almeria's hopes of a comeback as Rayo moved three points ahead of their 19th-placed visitors.
Celta Vigo opened up a healthy gap between themselves and the bottom three thanks to a valuable 1-0 win at Levante in Saturday's early kick-off.
Nolito's back-post tap-in from Augusto Fernandez's cross was enough for the visitors as David Barral missed his 61st-minute penalty for Levante.