Carlos Espe scored the winning goal in the 91st minute as Real Madrid beat host Elche 3-2 in the Spanish League.
Jose Mourinho’s men looked on course for a routine win after a Matías DeToro own goal and a strike from Kylian Mbappé put them ahead at the Estadio Martinez Valero.
But Elche showed great character to respond and put themselves on the cusp of a share of the spoils, as Abiel Osorio and Ver Nino erased Real Madrid’s advantage.
However, the hosts were arguably victims of their own ambition, as they faltered on the counter-attack in stoppage time, with Mbappé passing for Espy to score and prevent Real Madrid from suffering another early setback in the La Liga title race.
With this victory, Real Madrid equals points with Barcelona At the top of the Spanish League. Hansi Flick’s team hosts Racing Santander on Wednesday.
Madrid escapes a massive panic
Real Madrid’s only stumble so far this season came in their last away game, a 1-0 loss to Real Betis, and there were early warning signs at Elche that they were in for another tough encounter despite the home side’s failure to win any of their first five matches.
Elche started the game brightly, with Tite Morente firing wide before Osorio fired over the bar on two early chances.
Vinicius Junior veered wide and looked to have them at their mercy at the other end, but Elche paid for their profligacy when Arda Guler curled a stunning free-kick against the post, although he was not given credit for the goal as the ball glided past Ditoro on its way into the net.
Real Madrid’s lead was doubled eight minutes later when Yann Diomande sent in from the right, and the Ivory Coast winger then sent a perfect cross for Mbappe to score into the net.

The Real Madrid talisman needed treatment after colliding with the goalkeeper while scoring, but was involved as Real Madrid almost made it 3-0. Mbappe passed the ball to Vinicius after a quick break for Los Blancos, but Ditoro equalized his low effort.
It seemed that Mbappé doubled his score and gave Real Madrid a three-goal lead after he caught a through ball and shot it into the net at the near post, but the French star denied him the offside flag.
Osorio fired wide at the turn as Elche searched for a way back into the contest, and Morente then stung Courtois’ palms in lingering rage.
Morente came close to scoring with another ambitious shot that went wide but the hosts were lucky as Vinicius’ disappointing night in front of goal continued when he wasted another chance by directing a shot wide after good work from Guler.
Elche scored the goal they deserved in the second half in the 71st minute when substitute Luis Cepeda reached the goal line and sent a cross from the left side, which Osorio returned with a header that bounced over the goal and away from Courtois.
Twelve minutes later Elche completed the comeback. Thomas Lemar and Gossan combined well to pass the ball to Nino who calmly curled a powerful strike into the far corner.
This goal looked to have brought Real Madrid back to life, but it looked as if they would drop more points on their travels when Espy fired a shot wide of the target.
But Espy, Espanyol’s winner in Madrid’s first game of the season, made no mistake with an easy finish after Jude Bellingham set up Mbappe on goal and unselfishly put the ball on a plate for the substitute to seal the win.