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.
Trump says to stop 'expensive', 'provocative' South Korea war games
Kim as "little rocket man", and warned that the US would "totally destroy" North Korea. Admittedly, Trump said Kim was very pleased with the development.
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.