Vahid Halilhodzic signed a four-year contract as the new coach of Morocco but was handed a tough list of targets by his new employers.
The 67-year-old Bosnian replaces Herve Renard, who quit after Morocco were eliminated in the last-16 of the Africa Cup of Nations in Egypt despite being one of the favourites.
The new coach has been tasked with reaching the semi-finals of the next Africa Cup of Nations in 2021, qualifying Morocco for the World Cup in Qatar the year after, and winning the Cup of Nations in 2023.
"Failure to achieve any of these targets will automatically result in termination of the contract," said Moroccan soccer federation president Fouzi Lekjaa.
"It is a big responsibility to coach Morocco, a challenge and an honour," the new coach told reporters.
It is a return to national team management for the former Yugoslavia international striker, who took Algeria to the last-16 of the 2014 World Cup.
He also helped Ivory Coast qualify for the 2010 World Cup and Japan for the 2018 edition in Russia but on both occasions he was fired before the tournament.
Halilhodzic will receive a monthly salary of 80,000 euros ($89,000).