Real Madrid announced on Tuesday that Lopetegui would succeed Zinedine Zidane at the Bernabeu on a three-year deal.
The Spanish football federation (RFEF) said it had dismissed the 51-year-old because the negotiation occurred “without any information to the RFEF”.
Spain sporting director Fernando Hierro will take charge for the World Cup. The former Real Madrid and Bolton Wanderers defender is in his second spell as sporting director, having returned to the role in November 2017, six years after leaving the position. The tournament starts on Thursday in Russia.