Alaves found themselves atop the Spanish league table on Friday after their 1-0 win over Celta Vigo hoisted them ahead of Sevilla and Barcelona in the top three.
True to the formula installed by coach Abelardo Fernandez, Alaves defended superbly and executed a set piece to perfection in the 58th minute when Victor Laguardia squared a long ball for unmarked midfielder Tomas Pina to tap home.
Alaves have 17 points from nine games with Sevilla on 16 and Barcelona on 15 before they face each other on Saturday.
"These three points are golden," said goalkeeper Fernando Pacheco, who made two key saves to ensure the victory. "We have to keep our feet on the ground."
Real Madrid, who were beaten earlier this month by Alaves at Vitoria, are fifth in the table with 14 points.
Manu Garcia's goal in the 95th minute had sent the Mendizorrotza Stadium wild. It is the first time they have beaten Madrid at home in 87 years.
Alaves fans ran onto the pitch to celebrate their stunning 1-0 win and the chants continued long after the final whistle.
The new leaders are best remembered outside Spain for a run in the old UEFA Cup when they made it to the final in 2001, losing 5-4 to Liverpool in extra-time.
The defeat to Alaves had plunged the Madrid giants into a mini-crisis, with questions being asked of the manager Julen Lopetegui. However, Lopetegui had then insisted it was too early to be questioning his future.
Some of Celta's fans jeered the team after its first loss at home in the league since December 2017.
Following a promising start under new coach Antonio Mohamed, Celta hasn't won in six straight games and sits 10th.
Updated Date: Oct 20, 2018 10:22 AM