Spain coach Julen Lopetegui was sacked on Wednesday, two days before their opening World Cup match against Portugal, the head of the Spanish football federation (RFEF) Luis Rubiales told a news conference.
His dismissal came after Real Madrid unexpectedly announced on Tuesday that Lopetegui, who had only recently extended his contract with Spain, would take over as their coach next season.
Lopetegui's replacement would be announced "soon", Rubiales said.
"We want to thank Julen for all he's done and he's a big reason behind us being in Russia, but we feel obliged to dispense with his services," added Rubiales.
"There has to be a message to all RFEF employees and there are ways of behaving that you need to abide by."
Spain, one of the pre-tournament favourites, also face Morocco and Iran in their group in Russia.