Morocco have parted company with national team coach Vahid Halilhodzic just three months before the 2022 World Cup in Qatar.
The country's football federation (FRMF) said the decision was taken because of disagreements on how to prepare the Atlas Lions for the finals.
"The two parties have agreed to part ways amicably," a statement from the FRMF said.
Halilhodzic, 69, took charge of the North Africans in August 2019.
He led the side to the quarter-finals of this year's Africa Cup of Nations in Cameroon and then secured World Cup qualification in March following a 5-2 aggregate win over DR Congo.
The Bosnian's departure clears the path for the return of Chelsea winger Hakim Ziyech to the Morocco squad, following a highly publicised spat involving the pair.
The 29-year-old quit international football in February and then turned down a call-up for March's World Cup play-off against DR Congo - but FMRF president Fouzi Lekjaa subsequently said the door was open for Ziyech to return.
Speculations about the future of the Halilhodzic had been rife in the local media after Lekjaa announced that Ziyech would be a part of the World Cup squad.
Morocco will face 2018 runners-up Croatia, Belgium and Canada in Group F at the World Cup finals in Qatar.