If Spain fail to impress at the World Cup, then Lopetegui will head to Real Madrid under a cloud that will make an already difficult job even harder.
Lopetegui will put to pen to paper on a three-year deal at the Bernabéu running until 2021, the club confirmed.
Lopetegui took over Spain in July 2016 after Vicente del Bosque retired from the role.
But with three days before Spain's World Cup opener against Portugal in Sochi, Madrid announced that the Basque tactician will leave that position after agreeing a three-year contract with the La Liga giants.
Iran warns N. Korea over possible Trump U-turn on Singapore deal
Trump described the exercises as "very provocative " and said Pyongyang "very much appreciated" seeing the exercises end. The document is broken down into four key points, saying: "1".
Dennis Rodman: I got call saying Trump was proud of me
The basketball Hall-of-Famer said that he had received threats on his life after returning from North Korea in 2014. For those of you who don't know, Dennis has formed quite a strong relationship with Kim Jong Un and Donald Trump .
Report outlines fresh update in Arsenal's pursuit of Lucas Torreira
Torreira - who is now with the Uruguay squad preparing for the World Cup - is reportedly Emery's first-choice midfield target. Arsenal are ready to swoop for Sampdoria defensive midfielder Lucas Torreira , the Daily Star has claimed.
Previously, French manager Zinidine Zidane shocked the footballing world by announcing his resignation from Real Madrid. Before that, he was in charge of Spain's U21s, who won the 2013 European Championships.
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.
The former goalkeeper made a sole league appearance for Madrid as a player and later turned out for rivals Barcelona.
He began coaching in 2003 as assistant manager to Spain's Under-17 team and was also in charge of the Under-19s, Under-20s and Under-21s, before moving to Porto.
Lopetegui's side qualified for the World Cup by topping their group with nine wins out of 10.