Match ends, Rayo Vallecano 0, Real Madrid 2.
Rayo Vallecano 0-2 Real Madrid
Cristiano Ronaldo scored his 300th competitive Real Madrid goal as they beat Rayo Vallecano to stay four points behind La Liga leaders Barcelona.
Real had goalkeeper Iker Casillas to thank for being level at the break after being outplayed.
Gareth Bale's diving header was just wide after the break for the improved visitors before Ronaldo was denied a clear penalty.
Ronaldo finally headed home before James Rodriguez curled in a second.
The Portuguese's 300 Real goals have come in 288 games since joining from Manchester United for £80m in 2009.
He is the third player after Raul (323) and Alfredo Di Stefano (307) to reach 300 goals for Real. His rivals needed 741 and 396 matches respectively to reach that mark.
The 30-year-old scored five goals for the first time in Real's 9-1 hammering of Granada at the weekend but things were a lot nervier for the European champions on Wednesday night.
Until Ronaldo headed home Dani Carvajal's right-wing cross, Real looked in serious danger of being upset by their battling city neighbours and falling seven points behind Barca.
Ronaldo earlier had a blatant penalty appeal waved away after a clear foul by Antonio Amaya but he wasn't to be denied as he took his league tally for the season to 37 goals.
Colombian Rodriguez gave the scoreline a flattering look with a cool curled finish late on as Real responded to Barcelona's earlier 4-0 win against Almeria.
- 1CobeñoBooked at 61mins
- 2Román TrigueroBooked at 40mins
- 18Rosa Vale Castro
- 4AmayaBooked at 63mins
- 3Martínez GarcíaBooked at 44mins
- 6FatauSubstituted forSánchez Ruizat 57'minutes
- 23BuenoSubstituted forFedor Floresat 69'minutes
- 29EmbarbaSubstituted forAquinoat 81'minutes
- 9Contreiras Gonçalves
- 7Fedor Flores
- 21Sánchez Ruiz
- 22Pereira Carneiro
- 25Rodríguez Martínez
- 15CarvajalBooked at 54mins
- 8KroosBooked at 51mins
- 10RodríguezBooked at 20minsSubstituted forNachoat 90'minutes
- 11BaleBooked at 52minsSubstituted forHernándezat 90+1'minutes
- 9BenzemaSubstituted forIscoat 72'minutes
- 7Cristiano RonaldoBooked at 51mins
- 5da Silva Coentrão
- 20Rodríguez Ruiz
- Mario Melero López
- Shots on Target
Second Half ends, Rayo Vallecano 0, Real Madrid 2.
Substitution, Real Madrid. Javier Hernández replaces Gareth Bale.
Corner, Real Madrid. Conceded by David Cobeño.
Attempt saved. Cristiano Ronaldo (Real Madrid) right footed shot from outside the box is saved in the bottom right corner. Assisted by Isco.
Substitution, Real Madrid. Nacho replaces James Rodríguez.
Attempt missed. Tito (Rayo Vallecano) right footed shot from the centre of the box misses to the left.
Attempt saved. Miku (Rayo Vallecano) header from the centre of the box is saved in the top centre of the goal. Assisted by Nacho with a cross.
Corner, Rayo Vallecano. Conceded by Iker Casillas.
Attempt saved. Manucho (Rayo Vallecano) header from the centre of the box is saved in the bottom left corner. Assisted by Nacho with a cross.
Luka Modric (Real Madrid) wins a free kick in the defensive half.
Foul by Javier Aquino (Rayo Vallecano).
Attempt saved. Isco (Real Madrid) right footed shot from the centre of the box is saved in the bottom right corner. Assisted by Gareth Bale.
Daniel Carvajal (Real Madrid) wins a free kick in the defensive half.
Foul by Miku (Rayo Vallecano).
Substitution, Rayo Vallecano. Javier Aquino replaces Adrián Embarba.
Foul by Luka Modric (Real Madrid).
Miku (Rayo Vallecano) wins a free kick in the defensive half.
Attempt saved. Jozabed (Rayo Vallecano) right footed shot from outside the box is saved in the top centre of the goal.
Foul by Gareth Bale (Real Madrid).