The 51-year-old will take up the position after the World Cup, which begins on 14 June.
A statement read on the club website Julen Lopetegui will be the Real Madrid coach after the celebration of the 2018 World Cup.
Real Madrid C. F. announce that Julen Lopetegui will be the coach of the first team during the next three seasons.
Julen Lopetegui will join the club after Spain’s participation in the World Cup, after two years leading the national team.
Lopetegui however only signed a new deal with the Spanish FA three weeks ago, to extend his stay with the national team until 2020.
However, he has now been confirmed as Zinedine Zidane’s replacement, after the Frenchman resigned after winning a third consecutive Champions League with Los Blanco’s against Liverpool last month.