United No 1, De Gea is a long-term target for Real, with the Spanish giants said to be keen on making a mammoth bid for the Spain No 1. And as they had hoped, the European champions have announced the Frenchman's successor ahead of this summer's World Cup.
La Roja cruised through qualifying for this year's World Cup, with nine wins and a draw in 10 games, scoring 36 goals and conceding three.
Before he took over as Spain boss, Lopetegui was Porto manager for two years.
"Julen Lopetegui will join the club after Spain's participation in the World Cup, after two years leading the national team", the club's official website announced. It is hardly the ideal preparation for a World Cup.
Lopetegui is now preparing to lead Spain at the World Cup but the 51-year-old will depart his role as national team coach at the end of the tournament.
While it remains to be seen how Lopetegui's decision will affect his team and the players in the build-up to the competition, the timing of the announcement means that there will be an unwanted distraction throughout their time in Russian Federation. Again, far from ideal.
Lopetegui took over Spain in July 2016 after Vicente del Bosque retired from the role.
They face a World Cup group containing Iberian rivals Portugal, as well as Morocco and Iran.
Lopetegui is a surprise appointment as he was not one of the names widely touted to be Zidane's replacement.