Morocco have appointed Walid Regragui as their new coach, three months before they compete at the World Cup finals in Qatar.
The much-anticipated appointment of the French-born former Morocco international was confirmed by the Morocco football federation at a news conference on Wednesday.
It said he had signed a contract up to the following World Cup in 2026.
Regragui, 46, replaces Vahid Halilhodzic, who was fired earlier in August.
Regragui led Morocco's Wydad Casablanca to the African Champions League title in May.
He is a former Ligue 1 player with Toulouse and also competed in LaLiga with Racing Santander. He also helped Morocco reach the 2004 Africa Cup of Nations final where he played right back in the 2-1 loss to hosts Tunisia.
Regragui had previously worked as an assistant coach with the Morocco national team at the start of his coaching career, which has also included a spell with Al Duhail in Qatar.
He will start with two friendlies against Chile and Paraguay in Spain in late September as Morocco finalise their World Cup preparations.
In Qatar they have been drawn in Group F alongside Croatia, Belgium and Canada.
Veteran Franco-Bosnian coach Halilhodzic was dismissed on Aug. 11 after months of tension between him and football federation over player selection and, in particular, his falling out with star midfielder Hakim Ziyech.
Last year Halilhodzic, 69, accused the Chelsea player of feigning injury to miss out on mid-year friendly matches and left him out of the World Cup qualifying campaign and the Cup of Nations finals.
But federation president Fouzi Lekjaa had been pressing for a return of the Dutch-born midfielder amid a public outcry at his absence, putting him at odds with Halilhodzic.