The flag of Iraq (Arabic: علم العراق; Kurdish: ئاڵای عێراق) includes the three equal horizontal red, white, and black stripes of the Arab Liberation flag, with the phrase "God is the greatest" in Arabic written in Kufic script in the centre.
 This basic tricolour has been in use since its adoption on 31 July 1963, with several changes to the green symbols in the central white stripes; the most recent version adopted on 22 January 2008 bears the takbīr rendered in dark green and removes the three green stars present since 1963.
 The autonomous Region of Kurdistan emerged as an autonomous area within Iraq with its own government and parliament, President and Army. The Kurdistan Regional Government uses a separate flag known as the flag of Kurdistan which was adopted in 1992.
 Valid for Iraqi flags 1963–present
 The first flag of modern Iraq was in Mandatory Iraq, and was adopted in 1921. It was a black-white-green horizontal flag, with a red triangle extending from the mast side, inspired by the flag of the Arab Revolt. It was soon changed to a new version with a red trapezoid replacing the triangle and two seven-point white stars on denoting the Tigris River, and the Euphrates River. Both designs also reflected the newly installed Hashemite Dynasty in Iraq (originally from Hejaz in the Arabian Peninsula), who had played a leading role in the Arab Revolt. As such, it was similar to the flags of Hashemite Jordan, and the short-lived Kingdom of Hejaz. The new flag continued to be used in the Kingdom of Iraq.
 In 1958, in response to the merger of Egypt and Syria in the United Arab Republic, the two Hashemite kingdoms of Iraq and Jordan established the Arab Federation, a confederation of the two states. The flag of the union was essentially that of Jordan but without seven pointed star in the red chevron. This flag is identical to the flag of Palestine adopted in 1964, and almost identical to the flag of the Ba'ath Party. The union lasted less than six months, being terminated by the Iraqi Revolution of 1958 in July.
 Following the Revolution of 14 July 1958, led by Abd al-Karim Qasim, which abolished the Hashemite monarchy in Iraq and turned the country into a republic, Iraq adopted a new flag (Law 102 of 1959) that consisted of a black-white-green vertical tricolour, with a red eight-pointed star with a yellow circle at its centre. The black, white, green, and red are the Pan-Arab colors, representing pan-Arabism, with the yellow Kurdish Sun in the middle to represent the Iraqi Kurds, surrounded by the red Star of Ishtar to represent ancient Mesopotamian history.
 After Qassim was overthrown by the Ba'ath Party in 1963, the new Ba'athist government adopted a modified version of the Arab Liberation flag as the new flag of Iraq on 31 July 1963 (Law 28 of 1963). This horizontal tricolour of red, white, and black bands (a subset of the Pan-Arab colours, first used in the Egyptian Revolution of 1952) formed the basis of the flag of the United Arab Republic (UAR). Though the UAR broke up in 1961, hopes for Arab unity persisted. As such, whereas the UAR flag had two green stars in the white band, signifying its two members (Egypt and Syria), the new Iraqi flag had three stars, symbolising the aspiration that Iraq would join with Egypt and Syria in a new union. Sharing this goal, Syria adopted the new Iraqi flag as its own later that same year. This remained the flag of Syria until 1971, when the green stars were replaced by the Hawk of Quraish as the Coat of arms of Syria.
 
During the presidency of Saddam Hussein, the Iraqi Flag Law No. 28 of 1963 was replaced by Flag Law No. 33 of 1986, which did not alter the flag but changed the meaning of the three stars from their original geographic meaning to representations of the three tenets of the Ba'ath Party motto: wahda, hurriyah, ishtirakiyah (unity, freedom and socialism). On 13 January 1991, the flag was modified by Flag Law No. 6 of 1991. At the instigation of President Saddam Hussein, the takbīr (the phrase Allahu akbar, meaning "God is the greatest" in Arabic) was added in green between the stars. The form of the takbīr was said to be Saddam's own handwriting. Many[who?] interpreted the addition of the sacred Islamic text as an attempt to garner wartime support from previously outlawed religious Iraqi leaders, to stop the disrespect of the Iraqi flag in Iraqi-occupied Kuwait, and to bolster the Iraqi government's Islamist credentials in the period immediately preceding the Persian Gulf War.
 As with other flags inscribed with Arabic script, the hoist is to the right of the obverse (front) of the flag. The hamza over the alif of Allah in the main variant seems to be a spelling mistake, according to formal rules, but it is a common mistake which appears in many texts.
 Owing to differing views on a flag proposed by the United States-appointed administration, and the prevailing opposition to an outright abandonment of the current Iraqi flag, a compromise measure was adopted by the U.S.-appointed Iraqi interim administration in 2004. The basic form of the existing flag was retained; however, the takbīr was rendered in traditional stylized Kufic script, as opposed to the handwriting of Saddam Hussein.
 The modified flag was unveiled at the ceremony marking the technical "handover" of power from the Coalition Provisional Authority occupation forces to the U.S.-appointed administration on 28 July 2004.
 Despite this measure, the Kurdish population still opposed the flag, as it contained the three stars associated with the Ba'athist regime of Saddam Hussein, and thus, the atrocities that were committed upon the Kurds by the Ba'athists. This eventually led to the removal of the three stars in 2008, which also provoked some criticism among non-Kurdish Iraqis, who flew it in protest.
 On 22 January 2008, the Council of Representatives of Iraq approved its new design for the national flag, confirmed by Law 9 of 2008 as the compromising temporary replacement for the Ba'athist Saddam-era flag. In this current version, the three stars were removed, with the two words of the takbīr being brought closer together, and corrected the previous spelling of Allah (ألله to الله). The removal of the three stars was demanded by the Kurdish population of Iraq, who associated the three stars with the Al-Anfal genocide. But their removal provoked criticism among non-Kurdish Iraqis, mainly Iraqi Arabs, who argued that the stars did not represent the Ba'athist regime, and the city of Fallujah refused to fly the temporary flag that year unless instructed otherwise. The parliament intended for the new design to last one year, after which a final decision on the flag would be made. However, the flag law was reviewed in parliament on 30 August 2009.
 In 2012, there was an effort to replace the flag with a new design.
 The Iraqi flag consists of four colours: red, white, green and black, inspired by the poetic verse of Safi al-Din al-Hilli: "Our actions are bright, our battlefields are dark, our lands are green, and our swords are red with the blood of our enemies".
 The flag is in the form of a rectangle, the width of which is two-thirds of its length, and it consists of three horizontal bands of equal dimensions, the top in red, the middle in white, and the bottom in black, and the green word ʾAllāhu ʾakbar "الله اكبر" in Kufic script is in the middle of the middle white rectangle. The ratio of flag is 2:3.
 Following the military intervention in Iraq by the United States in 2003, the Iraqi government was overthrown, and the Ba'ath party was outlawed. Strong speculation followed that the U.S. government would press for a change in the Iraqi flag to remove its pan-Arab symbolism, and to make a definitive break with the period of Ba'athist rule. To a degree, this view was shared by some groups in Iraq. In addition to some displeasure among Iraqis who had suffered under Saddam Hussein to retaining national symbols used by his government, there was also strong aversion to the flag from Iraq's Kurdish minority, who resented its evocation of pan-Arabism. However, Iraqi opponents of changing the flag argued that since the flag had been used since 1963, long before Saddam Hussein's presidency, it was unfair to characterise it as a "Saddamist" flag. They also stressed that pan-Arabism has been a dominant popular principle among Iraqi's majority population for decades prior to Iraqi independence in 1932.
 On 14 August 2004 the U.S.-appointed Iraqi Governing Council (IGC) announced a new flag during Saddam's Iraq. The IGC stated that, from around 30 competing entries, it had chosen a design by the distinguished Iraqi artist-architect Rifat Chadirji, who lived in London, and is a brother of a member of the IGC. Chadirji commented that the guidelines stipulated that Iraq should be portrayed as part of the Western world, with historical elements included. His design was inspired by the flags of Canada and Switzerland.
 The proposed flag had several meanings:
 The design marked a notable break with the three flags of modern Iraqi history (namely the Arab Revolt-inspired flag of the Kingdom, the flag introduced by Abd al-Karim Qasim, and the Arab Liberation inspired flag of 1963), all of which were based on the four Pan-Arab colours. Indeed, of these colours, only white was represented in the IGC design. Moreover, Islamic crescents are usually depicted in green or red in Arab heraldry. The proposed change provoked an intensely negative reaction across groups of Iraq's Arab majority, including those vehemently opposed to Saddam Hussein. Those opposed to the U.S. occupation, including Shi'a cleric Muqtada al-Sadr, decried the design as an attempt by the U.S. government to strip Iraq of its identity, and its historically prominent role in the Arab world. In particular, critics lamented the proposed abandonment of the Arab Liberation Flag, the omission of the traditional colours of pan-Arabism, and the removal of the takbīr.
 Additionally, the new flag's predominantly blue-on-white appearance immediately antagonised many in Iraq because of its alleged resemblance to the flag of the State of Israel, considered hostile to Iraq since the former's establishment in 1948.
 The new flag was reported to have been burned by insurgents in Fallujah on 27 April 2004, the day before its planned official adoption.
 On 28 April 2004, IGC President Masoud Barzani formally presented a modified version of the flag in which the originally very light shade of blue as reported by the press on 26 April 2004 had been changed to a darker tone. It was unclear whether this was a change made because of the protests made against the original design or, as the Council claimed, a rectification of printing errors in the earlier news reports. Barzani also explained that the flag was a temporary design, to be used over the ensuing months until the adoption of a definitive flag.
 
In the face of the overwhelming public outcry, adoption of the blue crescent flag was abandoned entirely. 
Despite the compromise in 2004, opposition to the flag persisted from Kurdish groups. In January 2008, a new design was proposed, removing the three green stars, instead placing a green eight pointed star around a yellow circle in the middle of the takbīr, which is written in the Kufic script and prized as a Mesopotamian Arabic style, having originated in Iraq. In July 2008, the Iraqi parliament launched a contest to design a new Iraqi flag. The contest ran until September 2008, with 50 designs submitted. Six designs were chosen and sent to the parliament which was to choose a new flag before the end of 2008.
 Another proposed design was also similar to the 2004–2008 flag, but the script was changed to yellow to represent the Kurdish people in northern Iraq. The meaning of the three stars would be changed to symbolize peace, tolerance and justice.