Real Madrid beat Rayo Vallecano 2-1 in La Liga in their penultimate home game of the season. Karim Benzema's first-half opener was cancelled out by Raul De Tomas in the 84th minute, only for Rodrygo to net the winner for Los Blancos five minutes later.
The Red Sashes started the match brighter and tested Real Madrid custodian Thibaut Courtois with some long-range shots from Oscar Valentin, Unai Lopez, and Isi Palazon.
However, against the run of play, Los Blancos went in front as Benzema latched onto a defence-splitting pass from Federico Valverde to break the deadlock in the 31st minute.
Carlo Ancelotti's side looked to find a second goal after the break and dominated possession, but were unable to capitalize on it.
Vallecano, instead, stung their mighty hosts in the 84th minute when De Tomas equalized as the visitors were headed for a shock draw at the Santiago Bernabeu.
Their celebrations were short-lived, though, as Rordygo made it 2-1 for Real Madrid in the 89th minute with a deft low effort into the bottom corner.
Real Madrid provisionally leapfrogged Atletico Madrid into the second place on the La Liga table with 74 points from 36 games. Rayo Vallecano remained in 11th after their third consecutive loss.
Here are the player ratings for Real Madrid:
Thibaut Courtois - 8/10
Rodrygo will bag all the plaudits for his late winner but Courtois was an unsung hero for Real Madrid on the night with five saves to frustrate a dangerous-looking Rayo Vallecano.
Dani Carvajal - 7.5/10
The Spaniard was active at both ends of the pitch but truly came up trumps defensively with two crucial interventions. In the 14th minute, he slid in with a brilliant challenge to win the ball as Sergio Camello prepared to shoot. He also headed a cross from Oscar Trejo back to Courtois.
Nacho - 6.5/10
He made a risky backpass to Courtois that put him under pressure as Camello looked to pounce, but looked alright for the remainder of the match.
David Alaba - 5/10
The Austrian nearly conceded a goal in the opening minute when he slipped while looking to pass to Courtois, then had a deflected ball coming off him for Camello to pounce on. In the 67th minute, he was dispossessed in his own half as Vallecano hit Madrid on the break, but Rudiger recovered the ball to impede their movement.
Antonio Rudiger - 7.5/10
He was surprisingly dangerous in the first half, driving forward down the wings and looking to create goal-scoring opportunities. After the break, the German went quiet but was solid in defense, even making a crucial recovery in the 67th minute when Vallecano were on the offensive.
Eduardo Camavinga - 7.5/10
Real Madrid's battering ram, Camavinga, operated as the defensive midfielder and showed his class. He made three tackles, blocked one shot, and won nine ground duels.
Federico Valverde - 7.5/10
The Uruguayan international demonstrated his impeccable passing range and bagged the assist for Benzema's goal with an expertly weighted ball.
Luka Modric - 7.5/10
He was at the heart of Real Madrid's attacks. He set up a wonderful chance for Benzema in the ninth minute but the Frenchman fired it wide. In the second half, the Croat made an exquisite cross for Carvajal but the full-back couldn't direct his effort goalwards. On any other night, he would've bagged a couple of assists.
Toni Kroos - 7.5/10
The 33-year-old created many chances on the night but was a mixed bag defensively. In the fifth minute, a defensive header fell to Oscar Valentin for a chance, but it was recovered to make an excellent block to deny Unai Lopez. Then, Kroos got dispossessed in midfield by Isi Palazon, who drove forward and tried a shot.
Rodrygo - 8/10
Rodrygo's electric speed was a matter of concern for Rayo Vallecano on the left wing and saved his team the blushes with a later winner.
Karim Benzema - 8/10
The Frenchman was a big threat going forward and put Real Madrid in front in the 31st minute with his 18th goal of the La Liga season.
Substitutes
Dani Ceballos (63' for Valverde) - 7.5/10
He assisted Rodrygo's winner with a terrific pass that sliced Rayo Vallecano's defense open.
Marco Asensio (71' for Modric) - 6/10
He came on when Real Madrid were looking for a winner but couldn't really add much firepower.
Aurelien Tchouameni (83' for Rudiger) - 6.5/10
Just minutes before Rodrygo's winner, he tried his luck at goal with a long-range shot but Alejandro Catena blocked it.