The Spanish national team has been plunged into crisis after the coach Julen Lopetegui was sacked just a day before their World Cup opener against Portugal in Sochi.

The trainer lost his post after accepting an offer to become the new manager of Real Madrid.

The president of the Spanish Football Federation, Luis Rubiales, insisted that he had little choice but terminate Lopetegui’s contract as a matter of principle after the coach negotiated with Real Madrid behind their back.

The sacking comes in response to the news, released on Tuesday afternoon that Lopetegui had agreed to take over at Real Madrid when the World Cup ends.

Former Spain defender and director of football Fernando Hierro has been announced as Lopetegui's replacement.

Hierro's only previous senior coaching role was one season with Oviedo in the Spanish second division, although he was also assistant to Carlo Ancelotti at Real Madrid before that.

The 50-year-old will have barely 24 hours to prepare his team for their opening World Cup match against neighbours and bitter rivals Portugal in Sochi on Friday.

“We are in an extremely difficult situation; this is very, very hard,”

"The federation cannot be left out of a negotiation by one of its workers and be informed five minutes before the press release,"

"We have been compelled to act."

"It's a difficult situation, but we are not the ones who determined the action that had to be taken,"

"It may look like a weakness now, but with time this will make us stronger." Rubiales said.

Lopetegui did not attend the press conference in Krasnodar.