'alam al-mansûr

'Alam al-mansûr (علم المنصور) or liwa' al-mansûr (لواء المنصور) is a form of flag that was used as the emblem of the Almohad, Marinid, and Saadi dynasties of Morocco consisting of a white banner with an Islamic symbol written on it which were followed in parades by several banners of different colors, most of them red.

Almohad caliphate
In the 1150s, the Almohads adopted a large white banner surrounded by a large number of banners and pennants and dubbed it al-'alam al-mansûr, it had become an emblem for the dynasty and acquired an quasi-mystical status. Ibn Abi Zar describes in his Rawd al-Qirtas of a banner used by the Almohads during the Battle of Alarcos enscribed with the Shahada and Wala ghaliba illa Allah by saying that "when Alfonso VIII had decided to attack Muslims with his entire army [...] he heard the drums and the trumpets, he raised his head to look and saw the Almohad banner approaching; in front of them was a victorious white banner in which was written: there is no deity but Allah, Muhammad is the messenger of Allah, there is no victor except Allah. (لا إله إلا الله، محمد رسول الله، لا غالب إلا الله)"

Another description of the al-'alam al-mansûr claims that it is written with "The One is Allah, Muhammad is the messenger of Allah, the Mahdi is the Caliph of Allah" (الواحد الله، محمد رسول الله، المهدي خليفة الله) with another side saying "There is deity but Allah, and my success is only with Allah, and I entrust my affairs to Allah" (وما من إله إلا الله، وما توفيقي إلا بالله، وأفوض أمري إلى الله).

Marinid sultanate
The Marinid sultanate, who positioned themselves as successors of the Almohads, inherited the  'alam al-mansûr in its form surrounded by other banners. The banner preceded the Sultan's procession to the mosque for Friday prayer and acquired a sacred dimension where it was associated with a divine light, the nūr, legitimizing the Sultan's power. 

Saadi sultanate
After the Battle of Alcácer Quibir in which Saadi Sultan Ahmad al-Mansur emerged victorious, al-Mansur restored the use the banner as al-liwa' al-mansûr.  The banner was used as an emblem of the royal power during the Saadi sultanate. The banner was descriebd in al-Fishtali's Manahil.

The al-liwa' al-mansûr, which was also used as a central symbol of al-Mansur's state, also symbolized the central nature of the Makhzen, the continuity of the empire and especially its independence from the Ottoman Empire, and was displayed during all official ceremonies.