With only two days to go before Spain’s opening match at the World Cup in Russia, Julen Lopetegui was fired as national team coach after accepting a job to lead Real Madrid next season.

Spanish soccer federation president Luis Rubiales, who made the announcement on Wednesday in Krasnodar, later said Fernando Hierro would replace Lopetegui as coach for Spain’s match against Portugal in Sochi on Friday.

The 50-year-old Hierro, a former national team player and Real Madrid captain, will be taking on his first major coaching job. He had been acting as the federation’s sports director and was already in Russia with the national team.

Rubiales said firing Lopetegui wasn’t the best solution but it was needed after the federation was caught by surprise by Madrid’s announcement.

“The federation cannot be left out of a negotiation by one of its workers and be informed five minutes before the press release,” Rubiales said. “We have been compelled to act.”

Rubiales, who took over as president last month, said Lopetegui disrespected the federation’s values and it was the only decision he could make.

“It’s a difficult situation, but we are not the ones who determined the action that had to be taken. The federation has its values and it has to maintain them,” Rubiales said. “It may look like a weakness now, but with time this will make us stronger.”

Rubiales said he tried to keep the Madrid announcement from being made public but it wasn’t possible. He said he had to make the decision – which was supported by the federation’s board of directors – to “send a clear message” that things have to be done properly.

FRANCE: Striker Kylian Mbappe declared himself fit for the team’s opening Group C game against Australia on Saturday after taking a knock to his ankle in training.

MEXICO: Midfielder Diego Reyes has been ruled out of the tournament with a right thigh injury. He was injured playing for Porto and missed three friendlies in the build-up to the World Cup.

FIFA: Head of finance Thomas Peyer says he “anticipates strong revenues” leading to the 2022 World Cup in Qatar.

Peyer said income from broadcasting rights will add up to 53 percent of FIFA’s budgeted income of $6.56 billion over the next four years.

FIFA’s budget, which is typically conservative, calls for a $100 million overall profit through 2022.

FIFA President Gianni Infantino announced he will stand for re-election in June next year.