(CNN)Less than 24 hours after the unexpected announcement that Spain manager Julen Lopetegui would take over at Real Madrid next season, the Spaniard has been sacked by the country's football federation.
Julen Lopetegui: Spain sacks coach after he takes Real Madrid job
Lopetegui's dismissal comes just two days before Spain's opening World Cup game against Euro 2016 winners Portugal on Friday.
"We have been forced to make this decision," Spanish Football Association President, Luis Rubiales said according to a series of tweets from the official Royal Spanish Football Federation's official twitter account (RFEF).
Former Spain and Real Madrid captain Fernando Hierro, who was part of four Spanish World Cup squads between 1990 and 2002, will lead the team through the tournament.
"RFEF cannot be sitting on the sidelines whilst someone negotiates with one of its employees and then find out five minutes later before the news is made public," added Rubiales.
"It's a difficult and painful situation, and we would have liked for it to have finished differently with Julen. But we didn't plan the way it played out.
"We are all affected by this, but we have to think about what is best for the whole of RFEF and the national team.
"I'm sure in time, we will be stronger for this decision. We wish him the best of luck."