Spain have replaced head coach Julen Lopetegui with Fernando Hierro just over 24 hours before the start of the World Cup.
Lopetegui, 51, was named as the next manager of Real Madrid yesterday, having only recently agreed an extension to his role with the national team.
He took the job with Spain in 2016 and guided La Roja to Russia without suffering a single defeat in ten World Cup qualifying matches.
Their campaign will now be led by Hierro, 50. The former Real Madrid defender previously managed Real Oviedo for a season before being appointed the national team's sporting director in November 2017.
"What has happened with Lopetegui [and Real Madrid] has forced us to make this decision," said Luis Rubiales, the president of the Spanish Football Federation (RFEF).
Rubiales spoke at a press conference in the southern Russian city of Krasnodar, where Spain have based themselves during the tournament.
"We are grateful to Julen for everything that he has done, he continued. "He's one of those who deserve most of the credit for the fact that we're at the World Cup in Russia, but we have to dismiss him. It's a clear message to all RFEF employees that there is a code of conduct that has to be obeyed."
According to Rubiales, Lopetegui negotiated with Real Madrid without notifying anybody in the federation.
"The problem is in the way everything was done, everything was without any participation of the RFEF. We cannot ignore this," he said.
Hierro's first match in charge will be against Portugal in Spain's opening game in Group B on 16 June at 4am AEST.