The organising committee of the 2019 Africa Cup of Nations (Afcon) has apologised for including the flag of a separatist movement in its official music video.
The flag for the self-styled Sahrawi Arab Democratic Republic (SADR) appeared on a map in the video.
A diplomatic row ensued.
Morocco does not recognise the SADR, which for years has been seeking independence for the territory known as Western Sahara.
Its independence is recognised by the African Union.
Government spokesperson Mustapha El Khalfi was quoted as saying it was "not possible to accept the violation of Moroccan territory... it is utterly unacceptable to hurt the national feelings of Moroccans", according to Hespress website.
The committee insisted in a statement that the mistake was unintentional, reports Al-Masry al-Youm news site.
The offending video was deleted from Afcon's YouTube channel and an amended video has been published.
Afcon kicked off on Friday night and is hosted in Egypt.