Toni Kroos and Karim Benzema fired Real Madrid to a 2-1 win at home to Rayo Vallecano to go top of LaLiga on Saturday although Carlo Ancelotti's side had to face down a late onslaught from their neighbours following Radamel Falcao's second-half strike.
Real had drawn their last two league games at the Santiago Bernabeu 0-0 but got off to a strong start when Kroos drilled a shot into the top corner in the 14th minute after Marco Asensio had cut into the area from the right wing.
Their top scorer Benzema doubled their lead in the 38th by knocking in a defence splitting pass from defender David Alaba.
Real looked to be cruising their way to victory until Falcao came off the bench in the second half and soon scored a header, with the help of a deflection off Alaba, to put Rayo back in contention in the 76th minute.
It was the 35-year-old's fifth goal of the season since joining Rayo from Galatasaray in September and the Colombian is enjoying an unexpected renaissance with the Madrid minnows, including scoring the winning goal against Barcelona last month.
The goal awakened the visitors and struck fear into the hosts as Rayo had two late chances to grab an equaliser, Kroos clearing the ball off the line following a goalmouth scramble and keeper Thibaut Courtois tipping an Unai Lopez attempt over the bar.
The win took Real on to 27 points after 12 games, two above second-placed Real Sociedad who have also played 12 but can return to the summit if they beat Osasuna on Sunday.
Rayo are sixth on 20 points.
Ancelotti felt his side were worthy of the win despite their nervy ending to the game.
"It's not fair to say we almost drew the game, I saw a team that could have scored five or six goals. We fully deserved the three points," he said.
"It's logical that you get a bit nervous when you concede a goal with 10 minutes to go but overall we played well and I'm happy.
"It's normal to suffer a bit in football "
Considering anyone associated with Rayo would still have vivid memories of their 10-2 mauling at the Bernabeu in 2015, coach Andoni Iraola took plenty of encouragement from his side's performance even though they left the stadium empty handed.
"The reality is they beat us but we had them on the ropes right until the end " he said.
"The game was very equal, the key factor is they took their chances, especially in the first half.
"But we fought right until the end."