An Islamic flag is the flag representing an Islamic caliphate, religious order, state, civil society, military force or other entity associated with Islam. Islamic flags have a distinct history due to the Islamic prescription on aniconism, making particular colours, inscriptions or symbols such as crescent-and-star popular choices. Since the time of the Islamic prophet Muhammad, flags with certain colours were associated with Islam according to the traditions. Since then, historical caliphates, modern nation states, certain denominations as well as religious movements have adopted flags to symbolize their Islamic identity. Some secular states and ethnic or national movements also use symbols of Islamic origin as markers of heritage and identity.

History Early Islam

Before the advent of Islam, banners as tools for signaling had already been employed by the pre-Islamic Arab tribes and the Byzantines. Early Muslim armies naturally deployed banners for the same purpose. Early Islamic flags, however, greatly simplified its design by using plain color, due to the Islamic prescriptions on aniconism.Flag. Britannica. Retrieved 15 February 2019. According to the Islamic traditions, the Quraysh had a black banner and a white-and-black banner. It further states that Muhammad had a banner in white nicknamed "the Young Eagle" (, ); and a flag in black, said to be made from his wife Aisha's head-cloth. This larger flag was known as the "Banner of the Eagle" (), as well as the "Black Banner" (). In the Islamic tradition, Muhammad used the white flag to represent both the leader of the Muslim army and the Muslim state.The Islamic Imagery Project The Combating Terrorism Center Retrieved 27 May 2023 Other examples are the prominent Arab military commander 'Amr ibn al-'As using a red banner,Nour, "L’Histoire du croissant," p. 66/295. See also Ibn Khaldun, Muqaddimah, pp. 214–15. and the Khawarij rebels using a red banner as well. Banners of the early Muslim armies in general, however, employed a variety of colors, both singly and in combination.

The Umayyad Caliphate, which ruled the largest geographical extent of the medieval Islamic Empire, adopted white flags. During the Abbasid Revolution, the Abbasids incorporated the Black Standard based on the early Islamic eschatological saying that "a people coming from the East with black banners" would herald the arrival of the messianic figure Mahdi.Muhammad b. Yazid b. Maja (d. 887), Sunan, ed. Muhammad Fu˘ad ˜Abd al-Baqi, 2 vols. (Cairo: Halabi, 1372/1952), vol. 2: 1366–67; ˜Ala al-Din ˜Ali b. Husam al-Din al-Muttaqi (1477–1567), Kanz al-˜ummål, 8 parts (Hyderabad: Da˘irat al-Ma˜arif, 1312/1894–95), part 3: 203; part 4: 38, 39, 45, 53 The Shiite Alids chose the color of white to distinguish themselves from the Abbasids, but also adopted green flags. Thus in 817, when the Abbasid caliph al-Ma'mun adopted the Alid Ali al-Ridha as his heir apparent, he also changed the dynastic color from black to green. The change was reverted when al-Ma'mun had Ali killed, and returned to Baghdad in 819. The Abbasids continued to use black as their dynastic color. However, their caliphal banner was made of white silk with the Quranic inscriptions. The white color was then adopted, in deliberate opposition to the Abbasids, by the Ismaili Shiite Fatimid Caliphate, and cemented the association of black and white with Sunni and Shia respectively. It was also used by the Almohads. The Fatimid caliphal banner was decorated in red and yellow, sometimes emblazoned with the picture of a lion. Early Muslim rulers are generally not known to have used emblems of a distinctly dynastic, religious, or personal nature.

Middle Ages

The Ayyubids and Mamluks, succeeding the Fatimid caliphate, retained the association with yellow. The Ayyubid founder Saladin carried a yellow flag adorned with an eagle. Mamluk sultanic banners were yellow, but on occasion they used red banners. Mongol and Turkic dynasties to the east, including the Ilkhanate, Oghuz Turks and the Seljuq dynasty, preferred the white banner. Religious flags with inscriptions were in use in the medieval period, as shown in miniatures by 13th-century illustrator Yahya ibn Mahmud al-Wasiti. 14th-century illustrations of the History of the Tatars by Hayton of Corycus (1243) shows both Mongols and Seljuqs using a variety of war ensigns.

The crescent appears in flags attributed to Tunis from as early as the 14th century Book of Knowledge of All Kingdoms, long before Tunis fell under Ottoman rule in 1574. The Spanish Navy Museum in Madrid shows two Ottoman naval flags dated 1613; both are swallow-tailed, one green with a white crescent near the hoist, the other white with two red stripes near the edges of the flag and a red crescent near the hoist.Nozomi Karyasu & António Martins, 8 October 2006 on Flags of the World.

The hexagram was also a popular symbol among the Islamic flags. It is known in Arabic as Khātem Sulaymān (Seal of Solomon; ) or Najmat Dāūd (Star of David; ). The "Seal of Solomon" may also be represented by a five-pointed star or pentagram. In the Qur'an, it is written that David and King Solomon (Arabic, Suliman or Sulayman) were prophets and kings, and are figures revered by Muslims. The Medieval pre-Ottoman Hanafi Anatolian beyliks of the Karamanids and Jandarids used the star on their flag.The Muslim Empires of the Ottomans, Safavids, and Mughals, By Stephen F. Dale, 2009

The Mamluks served the Custodian of the Two Holy Mosques during their reign. During this time, they deployed what was believed to be the genuine relic of the Islamic prophet Muhammad's banner. The banner was later captured by the Ottomans, who called the flag the "noble banner" (Sancak-ı Şerif) and used it during their military campaign. The flag was made of black wool, according to the Ottoman historian Silahdar Findiklili Mehmed Agha, but there is no further information available.

Pre-modern era Ottoman Empire

War flags came into use by the Ottoman Empire in the 16th century, gradually replacing (but long coexisting with) their traditional tugh or horse-tail standards. During the 16th and 17th centuries, war flags often depicted the bifurcated sword of Ali, Zulfiqar, which was often misinterpreted in Western literature as showing a pair of scissors.e.g. Jaques Nicolas Bellin, Tableau des Pavillons de le nations que aborent à la mer (1756). A Zulfiqar flag used by Selim I (d. 1520) is on exhibit in Topkapı Palace. Two Zulfiqar flags are also depicted in a plate dedicated to Turkish flags in vol. 7 of Bernard Picart's Cérémonies et coutumes religieuses de tous les peuples du monde (1737), attributed to the Janissaries and Sipahis.

During the Tanzimat of 1844, the flags of the Ottoman Empire were redesigned in the style of European armies of the day. The flag of the Ottoman Navy was made red as red was to be the flag of secular institutions and green of religious ones. As the reforms abolished all the various sub-sultanates, pashaliks, beyliks and emirates, a single new flag was designed to replace all the various flags used by these entities with one single national flag. The result was the red and white flag with the crescent moon and star, which is the precursor to the modern Turkish flag. A plain red flag was introduced as the civil ensign for all Ottoman subjects.

Mughal Empire

The Mughal Empire had a number of imperial flags and standards. The principal imperial standard of the Mughals was known as the alam ( ). It was primarily moss green. It displayed a lion and sun ( ) facing the hoist of the flag. The Mughals traced their use of the alam back to Timur. The imperial standard was displayed to the right of the throne and also at the entrance of the Emperor's encampment and in front of the emperor during military marches.

According to the Ain-i-Akbari, during Akbar's reign, whenever the emperor rode out, not less than five alams were carried along with the qur (a collection of flags and other insignia) wrapped up in scarlet cloth bags. They were unfurled on the days of festivity, and in battle.Blochmann, H. (tr.) (1927, reprint 1993). The Ain-I Akbari by Abu'l-Fazl Allami, Vol. I, Calcutta: The Asiatic Society, p.52 Edward Terry, chaplain to Sir Thomas Roe, who came during the reign of Jahangir, described in his Voyage to East-India (1655) that the royal standard, made of silk, with a crouching lion shadowing part of the body of the sun inscribed on it, was carried on an elephant whenever the emperor travelled.Foster, William (ed.) (1921) Early Travels in India, 1583–1619, London: Oxford University Press, p. 306

Persian Empires

The Safavid dynasty (1501–1736) employed various alams and banners, especially during the reign of the first two kings, each with a different emblem. Ismail I, the first Safavid king, designed a green flag with a golden full moon. In 1524 Tahmasp I replaced the moon with an emblem of a sheep and sun; this flag was used until 1576. It was then that Ismail II adopted the first Lion and Sun device, embroidered in gold, which was to remain in use until the end of the Safavid era. During this period the Lion and Sun stood for two pillars of the society: the state and Islam.

The Afsharid dynasty (1736–1796) had two royal standards, one with red, white, and blue stripes and one with red, blue, white, and yellow stripes. Nader Shah's personal flag was a yellow pennant with a red border and a lion and sun emblem in the centre. All three of these flags were triangular in shape. Nader Shah consciously avoided the using the colour green, as green was associated with Shia Islam and the Safavid dynasty.

Modern history Flags of the Mahdiyya

Muhammad Ahmad declared himself al-Mahdī al-Muntaẓar (the Expected Rightly-guided One, successor to the prophet Mohammed) in 1881 and lead an Islamic revolution against the Ottoman-Egyptian rule of Sudan until his death in 1885.Mahdi Flag. National Portrait Gallery. Retrieved 19 December 2020. During the Mahdist War, the followers of al-Mahdi (Anṣār or ‘helpers’) adapted a traditional form of flag used in prayer by followers of Sufi religious orders, for military purposes. Sufi flags typically feature the Muslim shahada – "There is no God but God; Muḥammad is God’s Messenger" – and the name of the sect's founder, an individual usually regarded as a saint.Flags of the Mahdiyya. Making African Connections. Retrieved 19 December 2020. The traditional form of Sufi flag was adapted by adding a quotation from the Quran – "Yā allah yā ḥayy yā qayūm yā ḍhi’l-jalāl wa’l-ikrām" (O God! O Ever-living, O Everlasting, O Lord of Majesty and Generosity) – and the highly charged claim - "Muḥammad al-Mahdī khalifat rasūl Allah" (Muḥammad al-Mahdī is the successor of God's messenger). The flags were specifically colour coded to direct soldiers of the three main divisions of the Mahdist army – the Black, Green and Red Banners (rāyāt).

Star and crescent

By the mid 20th century, the star and crescent was used by a number of successor states of the Ottoman Empire, including Algeria, Azerbaijan, Mauritania, Tunisia, Turkey, the Turkish Republic of Northern Cyprus and Libya. Because of its supposed "Turkic" associations, the symbol also came to be used in Central Asia, as in the flags of Turkmenistan and Uzbekistan.