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.
What job faces Zidane at Real?
Despite returning less than a year after he left the club, Zidane faces a rebuilding job at Real Madrid after their Champions League dynasty came to a remarkable, humiliating end last week.
They have not adequately replaced Cristiano Ronaldo, who left for Juventus in the summer, with Karim Benzema the only Real player to reach double figures in La Liga (13). He has scored 22 goals in all competitions, with Gareth Bale on 13 and Sergio Ramos on 11.
None of those players have certain futures at Real, with captain Ramos, who has been at Real for 14 years, reportedly falling out with president Perez. Wales forward Bale is expected to leave because of a fractious relationshipwith the club’s fans – who have booed him recently – and players.
Other stalwarts of recent glory like Marcelo and Toni Kroos have struggled too.
Guillem Balague, host of BBC Radio 5 Live’s Football Daily podcast Euro edition
This may mean difficulties for Gareth Bale, who did not get on very well with Zidane.
Sergio Ramos will have his authority reinforced and Zidane also wants the likes of Eden Hazard and perhaps even Christian Eriksen to add to the side.
He will be given all the sporting authority and all the things he suggested in the summer that Florentino Perez did not want to do – most of them will be done now.
Zidane is coming in with the idea of not just managing the side but also managing the decisions for the first team.