An excellent Cristiano Ronaldo free-kick couldn't prevent Real Madrid from being dumped out of the Copa del Rey as a 2-2 draw at Celta Vigo on Wednesday allowed the hosts to progress to the semi-finals 4-3 on aggregate.
Hampered by a series of injuries, Real's hopes of turning the tie around were dealt a huge blow when Danilo's own goal handed Celta to lead on the night just before half-time.
Ronaldo gave Madrid hope with his first goal in the Copa del Rey for two years.
However, Daniel Wass restored Celta's lead five minutes from time before Lucas Vazquez's stoppage time header at least prevented Madrid from suffering a third defeat in four games.
Celta join Alaves and Atletico Madrid in Friday's semi-final draw.
Barcelona take a 1-0 lead over Real Sociedad into the final quarter-final, second leg on Thursday.
"We are out and disappointed. Most of all I am disappointed because the boys played so well," said Madrid boss Zinedine Zidane.
"We lacked just a few minutes more or one move (to score the third goal), but it wasn't to be."
Madrid faced a huge challenge to turn the tie around with Zidane missing seven first-team regulars through injury.
However, it was the visitors who enjoyed the better chances early on.
Celta 'keeper Sergio Alvarez made a stunning save to turn Ronaldo's header onto the bar before the World Player of the Year hit the post with the goal gaping on the rebound.
Injuries had also forced Zidane to change to a 3-5-2 formation and as Real pushed forward, Celta began to find space on the counter-attack towards the end of the opening half.
Iago Aspas wasted a huge chance when he tried to square to John Guidetti with just Kiko Casilla to beat.
Guidetti then forced Casilla into a fine save at this near post with a fiercely hit volley.
However, Celta did make the breakthrough just a minute before half-time as, despite Casilla's best efforts to again deny Guidetti, the loose ball cannoned off the helpless Danilo and into his own net.
It was the second consecutive Cup game away from home that the much-criticised Brazilian had opened the scoring with an own goal.
Yet, just when the tie was beginning to look beyond the European champions, Ronaldo brought the game back to life with a stunning free-kick that flew into the far corner from 25 yards just after the hour mark.
Madrid came within inches of levelling on aggregate moments later when the normally deadly Sergio Ramos headed wide from point-blank range.
Karim Benzema and another Ronaldo free-kick also flew just wide as Real hunted a second away goal.
However, they were caught out at the back when Jozabed teed up Wass to slot into the far corner.
Once again Real responded as substitute Vazquez turned a flick-on past Alvarez as the game entered stoppage time.
But it was too little, too late as Real's hopes of a first ever treble were extinguished.
Earlier on Wednesday, Atletico secured their place in the last four despite resting star forward Antoine Griezmann with a 2-2 draw at Eibar to progress 5-2 on aggregate.
Jose Maria Gimenez's header early in the second-half left Eibar needing to score five to go through, but goals from Sergi Enrich and Pedro Leon had them at least heading for victory on the night until Juanfran's late equaliser.
Updated Date: Jan 26, 2017 10:35 AM