The Spanish football association (RFEF) announced the sacking of national team coach Julen Lopetegui in a press conference on Wednesday.
"We thank Julen for everything that he has done, because he is a great person, who is responsible for us being in Russia," the head of the RFEF, Luis Rubiales, said. "However, we must fire him."
The move comes just two days before Spain are to open their World Cup campaign against Portugal - and just hours after Real Madrid announced that the 51-year-old Lopetegui would take over as their new head coach immediately after the World Cup.
"I understand that Real Madrid want to have the best of coaches but the national team belongs to all of Spain and this is not the way to do things," added Rubiales.
Lopetegui was appointed Spain's coach in July 2016 and never tasted defeat in the job, leading the team through 20 unbeaten games ahead of the World Cup. La Roja are among the favorites to lift the trophy this summer but this astonishing upheaval, so close to the tournament, could have a negative effect on the players.
There were fears his appointment could open up old divisions between the Real Madrid and Barcelona factions in the Spain squad. For the first time since 2006, there are more players from Madrid in a Spanish squad for a major tournament, with a six-strong Real contingent and just Gerard Pique, Jordi Alba and Sergio Busquets from Barca.
According to reports in Spanish media, the players tried to intervene at the last minute to prevent Rubiales sacking Lopetegui.
Rubiales conceded on Wednesday that the situation was far from ideal, but said that the RFEF had no choice but to sent a "clear message."
A few hours later, the RFEF announced that its sporting director and former Real Madrid captain, Fernando Hierro, would take charge of the national team for the World Cup.
pfd/hf (SID, APE)