Primera Liga leaders Real Madrid lost 1-0 at home to Real Mallorca in the King's Cup last-16 on Wednesday and went out of the tournament 3-1 on aggregate.
Argentine midfielder Ariel Ibagaza scored the only goal seven minutes from time at the Bernabeu, controlling a long freekick in the area and lobbing Jerzy Dudek to seal his side's passage. Mallorca won the first leg 2-1 last week.
Real dominated the match but missed a host of chances after starting with a second-string side.
The introduction of Ruud van Nistelrooy and Robinho in the second half failed to improve their luck and an inspired Miguel Angel Moya in the visitors' goal kept them at bay.
"I don't think you can play any better than we did at times, especially in the first half, but you cannot afford to miss your chances," said Real coach Bernd Schuster.
Mallorca will meet last season's finalists and Schuster's former club Getafe in the quarter-finals. Getafe beat the league's bottom club Levante 4-0 on aggregate.
Villarreal needed an extra-time goal from Italian striker Giuseppe Rossi to get past Recreativo Huelva with a 2-0 home win giving them a 2-1 aggregate victory.
Their reward is a meeting with Barcelona after Frank Rijkaard's side knocked out holders Sevilla on Tuesday. Barca drew 0-0 at the Nou Camp to go through on the away goals rule, having drawn 1-1 in Seville last week.
Argentine Sergio Aguero scored a great individual goal to put Atletico Madrid into the quarter-finals as they drew 1-1 at Valladolid to also progress on away goals.
They will face Valencia who, despite a seven-game winless streak in the league, overcame Real Betis 4-2 on aggregate with a comfortable 2-1 home win.
Racing Santander spoiled Ander Garitano's debut as coach of Real Zaragoza with a 4-2 comeback win at home to earn a 5-3 aggregate victory.
Ricardo Oliveira gave Zaragoza an early lead but Racing struck back with goals from Mohamed Tchite, Oriol, Oscar Serrano and an Ezequiel Garay penalty to win the tie.
Racing face 23-times Cup winners Athletic Bilbao who beat the 2006 winners Espanyol on penalties.
Andoni Iraola got a late equaliser for Bilbao, with Espanyol down to 10 men from the first half, sending the tie into extra time tied at 2-2. There were no more goals in the extra period but the visitors held their nerve to win the shootout 4-3.