Real Madrid were dumped out of the Copa del Rey at the quarter-final stage by Leganes on Wednesday as a 2-1 win at the Santiago Bernabeu proved enough to secure the visitors a famous victory on away goals.
Zinedine Zidane's men have now lost three of their last five home matches in all competitions and, with a 19-point gap to make up on rivals Barcelona in LaLiga, this was their last realistic chance of claiming domestic silverware and pressure on the Frenchman will inevitably grow further.
Marco Asensio's late strike had given Madrid a narrow 1-0 advantage in the first leg, but Javier Eraso's brilliant 25-yard curler got Leganes back on level terms and set the tone for a memorable cup tie.
Madrid were back in front inside two minutes of the second half, the fit-again Karim Benzema scoring his first goal since November after being set up by Lucas Vazquez.
The script said Madrid would serenely close out the tie from there but Leganes had not read it, a thunderous Gabriel Pires header from Eraso's corner putting them back ahead on the night and in front in the tie for the first time.
Leganes had never been to the quarter-finals of the Copa before, but they fully deserved to progress to the last four after holding Madrid - who were without Cristiano Ronaldo and Gareth Bale - at bay despite coming under intense late pressure.
Asier Garitano's men caused Madrid plenty of problems in the opening leg and they almost scored in the fifth minute here, Claudio Beauvue's free-kick clipping the outside of the post.
Darko Brasanac and Gabriel sent efforts straight at Kiko Casilla as Leganes continued to make the running, the visitors scoring the goal their performance deserved in the 31st minute.
Achraf Hakimi's loose pass put Nacho Fernandez in trouble and Eraso pounced, seizing the ball, striding into space and lashing a 25-yard drive that curled into Casilla's top-right corner.
Isco delivered a sublime right-wing cross Benzema which narrowly failed to meet before Leganes almost scored a spectacular second on the stroke of half-time, Beauvue's scissor-kick flying wide of the post.
Benzema was making his first Madrid start for a month and it was the France forward who got Madrid back on terms almost immediately after the interval.
Vazquez sent his team-mate into the box and Benzema beat Nereo Champagne with a cute chipped finish from a tight angle to restore Madrid's one-goal aggregate advantage.
But Leganes regained the lead eight minutes later as Eraso's corner was perfect for Gabriel to get clear of Theo Hernandez and thump a rocket of a header that flew past Casilla to send the visiting fans wild.
Zidane sent on Luka Modric and Dani Carvajal in a desperate attempt to save his chances of claiming a first Copa title as either a player or manager, but Isco fired over the angle after 72 minutes.
Champagne brilliantly denied Benzema and superbly tipped over a Sergio Ramos header as Madrid threw everything at Leganes, but Zidane's men could not force a late goal to avoid suffering a humiliating exit.