Real Madrid have come from two goals down to beat Villarreal 3-2 in the Copa del Rey last 16 thanks to a brilliant second-half performance by substitute Dani Ceballos.
The 26-year-old midfielder delivered an assist for Real's first goal, created the opening for the second and scored the winner for the visitors who looked to be on the brink of elimination when they trailed 2-0 at halftime.
Villarreal went ahead with an Etienne Capoue strike in the fourth minute and extended their lead in the 41st through Samuel Chukwueze.
But Ceballos came off the bench in the 56th minute to play a pivotal role in all of Real Madrid's goals.
A minute after coming on, he assisted Vinicius Jr who scored with a point-blank shot.
Twelve minutes later he crossed to Karim Benzema, whose towering header was denied by Filip Jorgensen but Eder Militao scored from the rebound.
In the 86th minute Ceballos slotted a perfect low shot from just inside the box to give Real Madrid the win.
"Things changed in the second half after a poor start," Madrid coach Carlo Ancelotti said.
"I told the players they had to wake up. We lost too many duels."
Earlier, Barcelona kept momentum from their Spanish Super Cup triumph by routing third-division Ceuta 5-0 to also advance to the last eight.
Robert Lewandowski scored twice for Barcelona, who at the weekend beat Real in the Super Cup final in Saudi Arabia to clinch their first title since Lionel Messi left in 2021.
Raphinha opened the scoring with a low left-footed shot from outside the penalty area in the 41st minute before Lewandowski added to the lead from inside the box after a pass by Franck Kessie in the 50th.
Ansu Fati netted the third in a breakaway in the 70th, Kessie scored the fourth with a header in the 77th and Lewandowski found the net again with a low strike in the dying moments.
"These matches can be difficult if you don't play at 100 per cent, so we had to take it very seriously," Barcelona's Sergi Roberto said.
"After the second goal things got a bit easier. We are happy to be through to the next round."
Barcelona did not make it past the round of 16 of the Copa last season, eliminated by Athletic Bilbao. They had won the trophy five times in seven seasons before that.
Atletico Madrid, Real Sociedad, Sevilla, Valencia and Athletic Bilbao have also advanced to the quarter-finals.
They are joined there by Osasuna, who eliminated defending champions Real Betis in a penalty shoot-out on Wednesday.
The draw for the last-eight will be on Friday.
- with Reuters