Spain coach Julen Lopetegui will take over as Real Madrid boss after the World Cup.
The 51-year-old, who has been in charge of the national team for the past two years, has agreed a three-year contract at the Bernabeu.
The move comes as a surprise, with Lopetegui not featuring prominently among the host of managers linked with the role since the departure of Zinedine Zidane days after Madrid’s 3-1 victory over Liverpool in the Champions League final.
The former goalkeeper made a sole league appearance for Madrid as a player and later turned out for rivals Barcelona.
Lopetegui previously coached Madrid’s feeder club Castilla in 2008/09 before taking charge of Spain’s youth teams.
Last month, the former Porto boss signed a contract extension to remain as Spain coach until 2020 but the call of Madrid has proved too strong to resist.