Real Madrid is enduring its worst scoring drought in more than three decades.
Alaves scored in the fifth minute of stoppage time to hand Madrid a 1-0 loss in the Spanish league on Saturday and leave the European champions without a goal in four matches in all competitions.
The last time Madrid went as long without a goal was 1985.
With only one win in five league matches, it is proving a difficult start to life at Madrid for Julen Lopetegui, who was fired as Spain coach on the eve of the World Cup in June for taking the club job.
Madrid center back Sergio Ramos defended Lopetegui, who took over from the hugely successful Zinedine Zidane this summer.
Ramos said it would be "crazy" to change managers now, because "the team is fighting for position at the top of the table. We have to remain calm and try to break this streak."
Lopetegui has to restore the team's attacking prowess without goals once provided by Cristiano Ronaldo, who was sold to Juventus in the offseason.
To make matters harder, Madrid lost forwards Gareth Bale and Karim Benzema to unspecified injuries that kept them from finishing the match Saturday.
They were off the field by the time Alaves sealed its first home win over Madrid since the 1930-31 season.
Alaves substitute Manu Garcia sent the fans at Mendizorroza Stadium into ecstasy when he headed in a corner kick knocked on by a teammate with the last touch of the match.
The memorable victory confirmed the team coached by former Barcelona defender Abelardo Fernandez as the revelation of the season. With only two loses in eight rounds, the modest Basque Country club rose to level on points with Madrid and Barcelona atop the league standings.
"This is going to be one of the best days of my career," Garcia, a midfielder and team captain, said. "I am very proud. All the teams are in a tight bunch at the top and this match has to show us the way forward."
Madrid's fortunes have taken a drastic turn since it beat Roma 3-0 in the Champions League less than two weeks ago. It has gone four matches in all competitions without a victory.
Madrid was stifled by Alaves' intense pressure and was mostly limited to incursions by right back Alvaro Odriozola.
Lopetegui sent on Mariano Diaz at halftime to replace Benzema, after six and a half matches without a goal from the French striker.
Seeing no improvement from his side, Lopetegui also sent on playmaker Marco Asensio for holding midfielder Casemiro, with Bale needing to be replaced late by Brazilian teenager Vinicius Junior.
But instead of Madrid bombarding the hosts, it was Alaves that earned a corner kick five minutes into stoppage time. Ruben Sobrino headed the ball to the far post, where goalie Thibaut Courtois could only palm it to Garcia, who nodded it in.
Barcelona, which has also had trouble winning in the league recently, visits Valencia on Sunday.
Forward Sergi Enrich scored a second-half header for Eibar to beat Girona 3-2 after a first half that ended 2-2 thanks to two video reviews.
Enis Bardhi scored from a free kick for Levante to win at Getafe 1-0, while Leganes beat Rayo Vallecano 1-0.