Madrid: The Spanish football federation (RFEF) has extended the contract of national team coach Julen Lopetegui until 2020.

The federation made the announcement on Tuesday, less than a week before Spain begin their preparations for next month’s World Cup in Russia.

“This day of happiness has arrived,” RFEF president Luis Robiales said in a statement. “We cannot have allowed Julen and his team to leave. The professional admiration and respect that we feel for him is huge and we want to announce the extension of his contract until 2020.

“We have much hope for the World Cup with him, knowing that it is difficult and that he only has a guarantee for three games — but with him, everything is possible.”

Lopetegui took over as coach after the team’s elimination from the 2016 European Championship. He led the national team on an 18-match unbeaten streak and comfortably qualified for the World Cup in a group that included Italy.

Lopetegui was picked as Vicente Del Bosque’s replacement mostly because of his success with Spain’s youth squads. He won European Championships with the Under-19 and Under-21 teams in the early 2010s.

Lopetegui had a lacklustre stint with Portuguese club Porto in his only job with a top team.