Herve Renard has stepped down as head coach of Morocco after failing to guide the Atlas Lions to win the Africa Cup of Nations in Egypt this year.
The Royal Moroccan Football Federation earlier this week denied reports the Frenchman had stepped down, but Renard used social media to confirm he has left his post.
Morocco endured a disappointing campaign, exiting the competition in shock circumstances in the round of 16 with a 4-1 penalty shoot-out defeat to Benin following a 1-1 draw.
The 50-year-old took over the Atlas Lions in February 2016 and guided them to the 2018 World Cup in Russia, their first qualification in 20 years.
"Morocco will always remain for me a country with which I lived incredible emotions," he wrote in a statement posted on Twitter.
"I am proud of what we have achieved and how far we have managed to come. It is time for me to close this long and beautiful chapter of my life, not without emotion and sadness, but it is an inevitable decision taken well before AFCON 2019."
Renard is a two-time winner of the Africa Cup of Nations with Zambia and Ivory Coast.