The 50-year-old will have barely 48 hours to prepare his team for their opening World Cup match against neighbours and bitter rivals Portugal in Sochi on Friday.
Real unexpectedly announced on Tuesday that Lopetegui, who had only recently extended his contract with Spain and was unbeaten in his 20 games in charge, would take over next season.
In announcing one of the most extraordinary coach sackings in World Cup history, Spanish football federation (RFEF) president Luis Rubiales said he had found out about the move five minutes before it was announced by the Champions League winners.
“The coach, while he is a RFEF employee cannot do things in this way. I found out with a phone call five minutes before the official announcement. We feel obliged to take this decision,” Rubiales told a news conference at the team base in Krasnodar.
“If anyone wants to talk to one of our employees, they have to speak to us, too. It’s that basic. This is a Spain national team that represents all Spaniards, it’s the most important team we have and the World Cup is the biggest stage of them all.
“I don’t feel betrayed, the problem is that things have been done with the complete absence of the RFEF, which is something (we) cannot let go by.”
PLAYERS ‘ALL IN’
Rubiales said the players, who Spanish media said had tried to dissuade him from such drastic action, had vowed to give everything for the team.
“We’re all hurt by this situation, I’ve told the players my reasons for doing it and they understand. They’ve shown me they are ‘all in’ here and I have no doubt they’ll give their all whatever happens,” he said.
Spain, one of the pre-tournament favourites and winners in 2010, also face Morocco and Iran in their group in Russia.
There was no immediate comment from the 53-year-old Lopetegui, who had been scheduled to appear alongside Rubiales but pulled out.
Rubiales added there were no hard feelings towards Lopetegui, who replaced Vicente del Bosque following Euro 2016.
“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,” he said.
“There has to be a message to all RFEF employees and there are ways of behaving that you need to abide by.”
In the first reaction to the decision, former Spain forward Juanito said Rubiales’ arguments had been impeccable.
“The values of the national team are above everything,” he said on Twitter. “If we can’t win the World Cup, the Spanish are now champions of dignity.”