“Real Madrid announce that Julen Lopetegui will be the coach of the first team during the next three seasons. Julen Lopetegui will join the club after Spain’s participation in the World Cup, after two years leading the national team,” Real said in a statement.

The announcement comes shortly after Lopetegui extended his contract as Spain coach until 2020 in a pre-World Cup boost for one of the tournament favourites.

Lopetegui succeeded Vicente del Bosque, who had overseen Spain’s triumphs at the 2010 World Cup and Euro 2012, but had also been in charge for the disappointing group stage exit at the 2014 World Cup in Brazil.

A former goalkeeper, he played 149 games in La Liga over 11 seasons, appearing in the competition for Real Madrid, Logroñés, Barcelona and Rayo Vallecano.

He started working as a manager in 2003, and spent several years in charge of Spain’s youth teams, leading the under-19 and under-21 sides to European titles.