Zinedine Zidane is returning to coach Real Madrid, the club he led to three straight Champions League titles.
Madrid said Monday the former France great has accepted an offer to replace Santiago Solari, signing a contract until June 2022.
The coaching change comes less than a week after two losses to Barcelona and another to Ajax. The results eliminated the club from the Champions League and the Copa del Rey, and ended its hopes of winning the Spanish league.
Spanish television channel La Sexta was the first to report Zidane's return. The official announcement came after the board of directors met Monday in Madrid.
Zidane quit not long after Madrid won the Champions League title last season, saying that he and the club needed a change in command to keep succeeding.
Zidane was expected to be in charge of Tuesday's practice session, and his first game back would be on Saturday at the Santiago Bernabeu Stadium against Celta Vigo. Madrid trails leader Barcelona by 12 points with 11 matches left. It is five points behind second-place Atletico Madrid.
Solari led the team to a 4-1 win at Valladolid on Sunday, and was in charge of practice on Monday. The club said it offered him an opportunity to remain with the club in a different position. The former Argentina and Madrid player had been the "B'' team's coach before taking over the main squad in October.
Solari led Madrid to 22 wins, eight losses and two draws in all competitions, and helped the team win the Club World Cup in December.
Zidane's name was a unanimous choice within the club but few thought he would accept returning so soon after deciding to take a break.
The level-headed coach took over in January 2016 and immediately won over the squad with his calm manner and easy-going attitude. In addition to the three Champions League titles, he also led Madrid to the 2017 Spanish league title, the club's first since 2012.
Shortly after Zidane left, Cristiano Ronaldo announced he was leaving to join Juventus, and Madrid has endured an up-and-down season which led to the humiliating losses to Barcelona and Ajax at the Bernabeu.
Zidane was replaced by Julen Lopetegui, the former Spain coach fired before the World Cup for taking the Madrid job. He lasted only a few months at the helm.
Solari took over from Lopetegui as an interim coach and eventually was given a full-time job with a contract until 2021 after putting the team back on track. Unlike Zidane, though, he struggled to manage the squad and was at odds with some of its key players, including Marcelo and Francisco "Isco" Alarcon.
Jose Mourinho, fired by Manchester United last year, was another strong candidate to replace Solari after succeeding with Madrid in the early 2010s. Other names mentioned included Juergen Klopp, Mauricio Pochettino, Joachim Loew and Antonio Conte, who was highly touted to take over from the fired Lopetegui. Some even wanted the club to consider former star Raul Gonzalez, who has just started coaching one of Madrid's youth squads.