He was also head coach of the senior national team for two years, but was dismissed before the start of the 2018 World Cup following the announcement of his agreement to join Real Madrid after the tournament.
[3] After a loan spell at Las Palmas, Lopetegui returned, but could never dislodge another veteran, Francisco Buyo,[3] only managing one La Liga appearance over two seasons,[4] a 3–3 away draw against Atlético Madrid as Real were already crowned league champions.
[3] Lopetegui's performances at Logroñés earned him his sole cap with Spain, coming on as a substitute for Zubizarreta for the final 30 minutes of a 2–0 friendly loss to Croatia in Valencia, on 23 March 1994.
[28] On 21 July 2016, after being strongly linked to English side Wolverhampton Wanderers which was under new ownership,[29] Lopetegui was announced as the new manager of the Spain national team following Vicente del Bosque's retirement.
[33] On 12 June 2018, with the team already in Russia for the tournament, it was announced that Lopetegui would take over as the head coach of Real Madrid on a three-year contract after the conclusion of Spain's involvement at the World Cup.
[38] Following a string of bad results and, ultimately, a 5–1 away defeat to Barcelona in El Clásico on 28 October 2018, Lopetegui was fired a day later,[39] being replaced by Santiago Solari.
[46][47] After leaving Sevilla, Lopetegui was interviewed by Wolverhampton, who had recently dismissed Bruno Lage, but he initially turned down the offer due to his 92-year-old father's ill health.
[51] Six days later, on his Premier League bow, they won 2–1 at Everton with a last-minute Rayan Aït-Nouri goal, and the manager thereby became the first at the club to win his opening match in the top flight since John Barnwell in 1978.
[53] In May 2023, he addressed speculation that he would leave due to the West Midlands club's financial situation;[54] he had stressed the need for new players to the management, but had only learned of the severity of the economic constraints at the end of the campaign.
[56][57] On 23 May 2024, Lopetegui remained in the English top division as the new head coach of West Ham United, taking the place of the recently departed David Moyes; he signed a two-year contract with an option for a third year.
[58][59] On his debut on 17 August, he oversaw a 2–1 home loss against Aston Villa, as the Hammers broke a league record by being defeated 16 times on opening days.