Cristiano Ronaldo added a brace to his midweek hat-trick as Real Madrid survived a major second-half scare to defeat derby rivals Rayo Vallecano 3-2 on Saturday and remain within six points of Primera Division leaders Barcelona.

After a hugely impressive attacking display in their 7-3 mauling of Sevilla on Wednesday, Madrid looked set for another goal glut as their forward trio of Ronaldo, Karim Benzema and Gareth Bale again came to the fore.

Ronaldo, who netted three against Sevilla, opened the scoring early on and then Bale set up further goals for Benzema and Ronaldo again as Madrid stormed into a 3-0 lead after 48 minutes.

However, Carlo Ancelotti's men were then stunned as Rayo won, and converted, two penalties in three minutes from Jonathan Viera to set up a thrilling final half-hour in which the home side hit the woodwork and came close on a number of other occasions.

Barcelona were in action on Friday against city rivals Espanyol and secured a 1-0 win thanks to Alexis Sanchez’s 68th-minute goal at the Nou Camp.

Real Sociedad gave themselves the perfect lift ahead of tomorrow’s Champions League clash with Manchester United by thrashing Osasuna 5-0 at home.

Atletico Madrid comfortably beat Athletic Bilbao 2-0 thanks to first-half goals from Diego Costa and David Villa.

It was Diego Simeone's side sixth consecutive win at the Vicente Calderon and it means they remain just one point behind the champions.

Athletic, meanwhile, went into the game just one point off the fourth Champions League spot but produced another disappointing away display and were reduced to ten men late on when Erik Moran was sent off.

Celta Vigo were also victorious as they claimed a 1-0 win over Sevilla after Alex Lopez capitalised on an error by goalkeeper Beto.

The Sevilla keeper made a hash of a clearance to put the ball at the feet of the Celta midfielder, who then beat him one-on-one to fire home in the 47th minute.

Valencia ended a three-game losing streak by securing a narrow 1-0 win at Getafe.

Los Che had lost at home to bottom side Almeria in midweek and the tension at the club was so high the players and coach were told not to speak to the media before the trip.

But Dorlan Pabon's rocket late in the first half was enough to give under-fire coach Miroslav Djukic some breathing space.

Getafe matched their opponents for most of the game and had several chances to score, the best of which fell to Jaime Gavilan in the last minute.

The win moved Valencia up to ninth in the table, three points behind Getafe.