Julen Lopetegui will take over as Real Madrid manager after the World Cup, the Bernabéu have announced.
Lopetegui will put to pen to paper on a three-year deal at the Bernabéu running until 2021, the club confirmed.
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.
Lopetegui has never lost a match as Spain coach since taking the reins in July 2016 in the wake of the European Championship, earning 14 wins with six draws for the second-longest unbeaten start by a coach in Spain's history.
The most exciting games from Square Enix's E3 showcase
Although it came out in Japan last year, it will finally make its way to the United States on September 4th of this year. This time, however, we were treated to a brand new trailer, and this one reveals the world of Pirates of the Caribbean .
Former goalkeeper Lopetegui, 51, made a sole league appearance for Madrid as a player, and later turned out for rivals Barcelona a handful of times.
"Julen Lopetegui will join the club after Spain's participation in the World Cup, after two years leading the national team".
The timing is also unexpected as Spain kick off their World Cup campaign on Friday when they take on Portugal at the Fisht Olympic Stadium in Sochi, Russia.
He has previously coached Spain's youth sides and had two years in charge of Porto.
Lopetegui impressed in quickly blending together a new side which won nine of their 10 World Cup qualifiers and is among the favourites for this summer's finals in Russian Federation. They also play Morocco and Iran in the group stages.