Zinedine Zidane said he is “very happy to be home” after returning as Real Madrid manager just 10 months after leaving the Spanish giants.
The Frenchman replaces Santiago Solari, who was sacked after less than five months in charge.
Former Real midfielder Zidane, 46, who left in May after leading the club to a third straight Champions League trophy, has agreed to take over until 2022.
Real are currently third in La Liga, 12 points behind leaders Barcelona.
“The best manager in the world has rejoined the club,” Real president Florentino Perez said.
“Our destinies are once again united.”
Solari’s last match as manager was a 4-1 win over Real Valladolid on Sunday – which followed a shock Champions League exit to Ajax.
That 4-1 home defeat and 5-3 aggregate loss to the Dutch side was the final straw for Perez.
The Champions League elimination followed two consecutive losses to Barcelona in El Clasico – a 1-0 reverse in La Liga and a 4-1 aggregate defeatin the Copa del Rey.
Zidane stepped down following the Champions League final victory over Liverpool, and Julen Lopetegui was hired as his successor just before the World Cup where he had been due to lead Spain, who promptly sacked him.
Four and a half months later it was Real’s turn to fire him.
Reserve-team boss Solari came in as caretaker before being given a contractto 2021 on 13 November.
“Real Madrid thanks Santiago Solari for his work done and the commitment and loyalty he has shown to what is his home,” the club said.
It added the former player had been offered another role with the club.
Zidane was officially unveiled in a ceremony on Monday and said: “I want to put this club back where it belongs.
“It has been difficult from the outside looking in.
“I have been living here in Madrid, doing my things. But I have recharged my batteries. I’m ready to coach this great club again.”