Real have announced that after the tournament he will take over at the Bernabeu, stepping into the role that Zidane Zidane vacated following his shock departure at the end of May - just days after guiding Real to a third consecutive Champions League title.
Lopetegui will put to pen to paper on a three-year deal at the Bernabéu running until 2021, the club confirmed.
Real Madrid have announced that Spain boss Julen Lopetegui has been appointed as the club's new head coach.
What Milinkovic-Savic Just Said About Potential Move
Manchester United also want to sign Milinkovic-Savic this summer and they are aware of the rivalry from the European Champions. The player, however, will be deciding his future only after getting done with Serbia's campaign at this year's World Cup .
Lopetegui, 51, has been in charge of the Spanish national team since July 2016, when he took the reins following the European Championship in France.
After retiring from football, Lopetegui became an assistant for Spain's U17 team in 2003, before swiftly taking charge of Liga B side Rayo Vallecano.
Lopetegui, 51, was hired by Spain following their underwhelming Euro 2016 campaign and the former Porto boss has helped re-establish La Roja as genuine contenders this summer in Russian Federation.
Tottenham's Mauricio Pochettino had been identified as Real Madrid's primary target but the Argentinean was rendered unattainable having recently signed a new five-year contract. They also play Morocco and Iran in the group stages.