Herve Renard has resigned as coach of Morocco after a disappointing AFCON campaign, which saw them knocked out in the last 16.
The Royal Moroccan Football Federation earlier this week denied reports the Frenchman had stepped down, but Renard used social media on Sunday to confirm he has left his post.
Morocco endured a disappointing Africa Cup of Nations 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."