They head into the World Cup as among the favorites to win a title they claimed in 2010, and are on a 20-game unbeaten run.
The ex-Porto manager is also no stranger to Real, with three years spent at the Bernabeu between 1988 and 1991 during his playing days and a period coming in charge of Real's "B" squad between 2008 and 2009.
The 51-year-old will take up the position after the World Cup, which begins on 14 June.
"So I think everybody will be happy with it, but mostly because Real were surprised by the departure of Zidane and had to react as soon as possible".
ICC overturns Bemba’s 18-year sentence over war crimes
Christine Van den Wijngaert said the judges in the 2016 case did not take into account Bemba's attempts to stop the crimes. Bemba was found guilty in 2016 of crimes committed in the neighbouring Central African Republic (CAR) from 2002 to 2003.
"It has taken about two weeks, but it's a recognised name, they know what he's bringing, and I do think the fans will be happy".
In addition, he remains something of an unknown quantity as a coach.
This marks a return to club football for the Asteasu, Spain native, who took over La Roja following the retirement of Vicente del Bosque after Euro 2016. At the very highest level, however, he is still somewhat untried.
"The RFEF will receive payment of the release clause so that the current national coach can join Real Madrid", read a statement, adding that Lopetegui would appear alongside federation president Luis Rubiales at a press conference at Spain's Russian training base on Wednesday at 11:30am (0830 GMT).
They face a World Cup group containing Iberian rivals Portugal, as well as Morocco and Iran.