Rafael Benitez has been sacked as manager of Real Madrid after just seven months in charge, with club legend Zinedine Zidane replacing him.
Spaniard Benitez, 55, was relieved of his duties following a meeting of the club's board on Monday.
B team coach Zidane, 43, has been made first-team boss, but the length of his contract has not been made public.
The World Cup winner said: "I am going to put my heart and soul into this job so that everything works out well."
Benitez's final game was Sunday's 2-2 draw with Valencia, which left them third in La Liga, four points behind leaders Atletico Madrid.
Zidane, whose first game in charge will be on Saturday against Deportivo La Coruna at the Bernabeu, is the 11th coach to be appointed in Florentino Perez's 12 years as club president.
|Benitez's Real Madrid record|
'It's an emotional day'
Zidane thanked Perez for giving him the opportunity to train the "best club in the world with the best fanbase in the world".
The Frenchman added: "I want to do my very best to ensure that this club at the end of the season will have a trophy.
"It is an important day for me, it's an emotional day, even more emotional than the day I signed as a player for the club.
"I will be working hard with all the players and I think it will go well. I will put all the heart I have into this job for the club. Thank you very much."
Why sack Benitez?
Perez is yet to explain why the board of directors took the "difficult" decision to dismiss Benitez, who once coached the club's youth teams.
But he acknowledged his "dedication" and called the Spaniard a "great professional and a great person".
Benitez lost only three of his 25 games and also took Real into the last 16 of the Champions League with two games to spare.
A thumping 8-0 home win over Malmo and a 10-2 victory against nine-man Rayo Vallecano were amongst his most notable successes.
But it would seem a combination of factors led to his downfall, among them a 4-0 home defeat by Barcelona in November and reports of a rift with star forward Cristiano Ronaldo.
The right replacement?
Zidane has no experience of managing at the top level, but he has long been seen as a future Real boss.
He has been coach of the club's B team, who are second in the Spanish third tier, since 2014 and was a key member of the backroom staff under Carlo Ancelotti, who led Real to a 10th European Cup title.
During his playing career, Zidane was one of Real's key 'Galacticos', a label given to the expensive players signed by Perez during his first spell as president in the early to mid-2000s.
In 2001, Real paid Juventus a then world record fee of £45.8m for the midfielder, who had won the World Cup and European Championship.
Zidane helped Real win the league in 2003 and was named Fifa world player of the year for a third time.
But perhaps his defining moment for the club came during the 2002 Champions League final, when he scored a stunning volley to give his side a 2-1 win over Bayer Leverkusen at Hampden Park.
He retired from football after the 2006 World Cup final, when he was sent off in extra time for headbutting Italy's Marco Materazzi in the chest.
'The best person for the job'
David Beckham, who played alongside Zidane at Real, thinks his former team-mate will be a big hit.
"Does it get any better than this?" he wrote on his Instagram account.
"A man that has been the best at a game we all love taking over a club that myself and many more people love."
Beckham praised Zidane's "drive" and "passion", adding he "does not accept failure on any level" and is the "best person for the job".
Xabi Alonso and Ronaldo, two former Real players, wished Zidane "luck", as did ex-Chelsea striker Didier Drogba.
'His managerial experience is zero'
Former Real president Ramon Calderon has criticised Perez, claiming his background as a civic engineer does not make him well equipped to run a high-profile football club.
"He decided to sack Carlo Ancelotti when everyone loved him," Calderon told BBC Radio 5 live.
"I wish Zidane all the best but it will be difficult. If he is not successful, Jose Mourinho will be on the bench in June, I am sure."
Former Real manager John Toshack feels the appointment of Zidane is a risky move.
"Zidane was a terrific player, but his managerial experience is zero," Toshack told BBC Radio Wales.
"It is a last throw of the dice for Perez. He idolises Zidane and always has done. If this one doesn't come off, there will be changes at the top."
Spanish football writer Andy West on Benitez's departure:
"The first major criticism of Benitez came following a 1-1 draw with local rivals Atletico Madrid in October.
"But that was nothing compared to the avalanche of abuse endured by Benitez after Barcelona's sensational 4-0 Clasico victory in November.
"That game concluded with loud chants for the former Liverpool manager's dismissal ringing around the Bernabeu after his team were utterly outclassed by their rivals.
"Benitez survived that trauma, but he never really recovered. From that moment, his departure was just a matter of time.
"Every home game since the defeat by Barca was preceded by loud jeers whenever Benitez's name was announced with the team line-ups."
What next for Benitez?
Benitez may be loved in Liverpool and Valencia, but his reputation as a manager has diminished in his past two jobs - at Napoli and Real.
Having won the Champions League at Anfield and the Uefa Cup with Valencia, he won the Coppa Italia in his first season at Napoli, but things soured in his second and final campaign.
The Serie A side failed to qualify for the Champions League despite the big-money signings of Gonzalo Higuain, Jose Maria Callejon, Raul Albiol and Dries Mertens, while Benitez was criticised for his rotation policy and stubborn adherence to a 4-2-3-1 formation.
The former Liverpool boss boasts a trophy-laden CV, including the Europa League from his short spell at Chelsea and both the Club World Cup and Italian Super Cup at Inter Milan.
That may tempt other Premier League clubs to turn to a man whose family home is still in Liverpool.
West Ham co-chairman David Sullivan said Benitez was "two hours away" from being appointed Hammers boss before joining Real.
And what next for Mourinho?
The former Chelsea, Porto and Inter Milan boss was linked with a return to Real as the pressure built on Benitez.
The Portuguese guided the club to the league title in 2012, but there were reports his relationship with Ronaldo broke down during his time at the helm, while he also had high-profile clashes with fan favourites Sergio Ramos and Iker Casillas.
There will inevitably be continued talk of Mourinho and Manchester United, but Louis van Gaal remains the Old Trafford manager for now.