Julen Lopetegui has been removed as Spain manager a day after it emerged that he had agreed to take over at Real Madrid after the World Cup.

Lopetegui has signed a three-year deal to succeed Zinedine Zidane with the Champions League holders and it was decided that in the circumstances it was inappropriate for him to continue with Spain.

The Spanish Football Association president, Luis Rubiales, was supposed to be at Fifa’s congress in Moscow on Wednesday but flew to Spain’s training base late on Tuesday night to deal with the matter.

“We have been forced to dispense with the national coach. We wish him the greatest of luck,” said Rubiales.

“The negotiations have occurred without any information to the Spanish FA and we were informed just five minutes before the press release. There’s a way to act that needs to be fulfilled.”

Spain play their first Group B match against Portugal on Friday evening.