Real Madrid crashed to a humiliating Copa del Rey exit on Wednesday when they were knocked out by little Leganes in the quarter-finals with under-fire coach Zinedine Zidane taking the blame.

European champions Real lost 2-1 in the second leg at their Bernabeu home as the tie finished 2-2 on aggregate with their modest city neighbours going through on away goals despite having lost the first leg 1-0 last week.

“I am responsible for all of this. It’s a failure for me,” said Zidane who recently penned a contract extension until 2020.

Admitting that it had been his worst night as a coach, the Frenchman added: “It’s a logical result, our opponents played their match and we did not.

“It is a big blow. We did what we had to do in the first leg. Nobody expected this, especially me but this is football.

“I am the manager. I picked the team and I was wrong in many regards. It’s up to me to find the solutions. I will continue to fight, to work, to battle and to find the things the team needs.”

Javi Eraso gave Leganes a 32nd-minute lead with a spectacular curling shot from long range.

Karim Benzema levelled on the night after 47 minutes thanks to a pass from Lucas Vazquez but Brazilian striker Gabriel Pires then hit the winner with a firm header eight minutes later.

It was a depressing evening for Zinedine Zidane’s side who, despite being in the Champions League last 16 where they face Paris Saint-Germain in three weeks’ time, are 19 points behind Barcelona in the Spanish title race.

The fans let their feelings known by booing off the team at half-time.

Leganes have a budget of just 45 million euros — 15 times less than the 675 million euros commanded by mighty Real.

Even without Cristiano Ronaldo and Gareth Bale, who were rested Wednesday after starring in the 7-1 rout of Deportivo La Coruna at the weekend, Real should still have had enough firepower for a side languishing in 13th spot in La Liga.

Zidane started with Sergio Ramos, Karim Benzema and Marco Asensio, who scored in the first leg but he got a warning of what was to come when Claudio Beauvue saw a free-kick come back off a post.

But Leganes put on an inspired display, despite having their backs to the wall late in the game, to make the semi-finals for the first time.

In the night’s other game, Valencia made the semi-finals but needed a 3-2 penalty shoot-out to defeat Alaves who won 2-1 for a 3-3 aggregate.

On Tuesday, Sergio Escudero’s goal after just 24 seconds set Sevilla on their way to a 3-1 win over Atletico Madrid and a place in the semi-finals. Sevilla, finalists in 2016, had won the first leg 2-1.

Meanwhile, Brazilian playmaker Philippe Coutinho has been named in the Barcelona squad for Thursday’s Copa del Rey clash against Espanyol, his first call-up since his 160 million euros ($194 million, £142 million) move from Liverpool.

Coutinho, who has been handed the number 14 shirt vacated by China-bound Javier Mascherano, had been sidelined by a thigh injury since his drawn-out transfer saga came to an end on January 6.

The 14 shirt was also worn by the club’s Dutch legend Johan Cruyff who died in 2016.

Coutinho has been cleared to make his debut at Camp Nou as Barcelona look to overturn a 1-0 defeat to Espanyol in the first leg of their quarter-final clash.

Coutinho spent six months with Barcelona’s city rivals on loan in 2012.

Club captain Andres Iniesta and striker Paco Alcacer were also included in the 19-man squad for Thursday’s game as was Colombian defender Yerry Mina, another transfer window recruit.