The former Malaga man has been in and out of the team at Madrid to his immense frustration, but spoke recently of how playing for the national team, under Lopetegui, 'gives me life'.
He will be coaching the team for the next three seasons.
Lopetegui, who has been in charge of the national team for the past two years, has agreed a three-year contract at the Bernabeu.
Lopetegui's national squad includes six Real players in Dani Carvajal, Sergio Ramos, Nacho Fernandez, Marco Asensio, Isco and Lucas Vazquez.
The secret's in the timing. He also secured two Copa del Rey titles, one Intercontinental Cup and a remarkable nine Liga crowns. Recruiting a player of that calibre in a problem position would be a simple way to immediately improve an already brilliant team.
Real Madrid's search for a manager to replace the departed Zinedine Zidane is over. He enjoyed success with the country's youth sides, winning the 2012 Under-19 European Championship before repeating the feat as Under-21 boss 12 months later.
Camacho initially took charge of Madrid in the 1998 off-season but quickly departed without overseeing a competitive fixture, citing a lack of confidence from the board. All look better options than Navas. He lasted just six miserable matches. But what is the view in Spain?
The 40-year-old has been a constant feature for Italy since making his debut in 1997 and holds the record for the most international appearances having appeared 176 times for his country.
Zidane's resignation came as a big shock, as he had just led Real Madrid to a third consecutive UEFA Champions League triumph. And as they had hoped, the European champions have announced the Frenchman's successor ahead of this summer's World Cup.