The search to replace Zinedine Zidane, who left after guiding Real to a third-straight Champions League title, lasted nearly two weeks, with Mauricio Pochettino, Antonio Conte and Jurgen Klopp among the names reportedly in the frame.
The 51-year-old has signed a three-year deal with the European champions, per the Guardian.
Merkel open to European Union migration reform, cautious on eurozone
Despite Mr Trump's actions , the UK, France and Germany have insisted they will stand by the commitments made at the summit. A few hours earlier, Trudeau had told reporters that all seven leaders had come together to sign the joint declaration.
Lopetegui has endured a mixed managerial career thus far, but has history with Los Blancos, having managed the club's B team between 2008 and 2009.
The Spain boss will take over at Santiago Bernabeu after the 2018 World Cup.
Lopetegui is now preparing to lead Spain at the World Cup but the 51-year-old will depart his role as national team coach at the end of the tournament.
England boss Gareth Southgate raring to go
Gareth Southgate is not anxious about club rivalries coming to the fore when England set off for the World Cup next week. They will play their opening game against Tunisia on June 18.
Spain qualified for Russian Federation 2018 with relative ease, topping a group containing Italy. They also scored 36 goals, and their form means they are one of the favourites ahead of the tournament in Russian Federation.
He was sacked after just 10 games in charge, and after a spell away from management, he took up a coaching role with Real Madrid Castilla.
Lopetegui will have his work cut out at Real Madrid, where standards are high and patience tends to be short with managers unless they deliver instant success.
Five locals receive Queen's Birthday Honours
In total, 1,057 people have received an award with 10% of the successful candidates come from a BAME background. AN inspirational Stourbridge nurse has been awarded an MBE in the Queen's Birthday Honours List .
With Real Madrid appointing Julen Lopetegui after the World Cup is over, plenty are pointing out how this is HUGE news for one current member of the squad.