The origins of the Islamic State can be traced back to three main organizations. Earliest of these was the "Jamāʻat al-Tawḥīd wa-al-Jihād" () organization, founded by the Jihadist leader Abu Mus'ab al-Zarqawi in Jordan in 1999. Although the other two predecessor organizations emerged during the Iraqi insurgency against the U.S. occupation forces which included the "Jaish al-Ta'ifa al-Mansurah" () group founded by Abu Omar al-Baghdadi in 2004 and the "Jaysh Ahl al-Sunnah wa’l-Jama’ah" () group founded by Abu Bakr al-Baghdadi and his associates in the same year, the modern iteration of the Islamic State was formed after the U.S. occupational forces outlawed the Iraqi branch of the Arab Socialist Ba'ath Party putting the Sunni soldiers and bureaucrats out of work.

The group went through a number of name changes as it declared itself not just an organization but a state, and then declared itself as a worldwide caliphate. In 2004, it became Tanẓīm Qāʻidat al-Jihād fī Bilād al-Rāfidayn, commonly known as al-Qaeda in Iraq (AQI), when al-Zarqawi gave bay'ah to Osama bin Laden and al-Qaeda. The same year, Abu Omar al-Baghdadi and Abu Bakr al-Baghdadi established the "Jaish al-Ta'ifa al-Mansurah" (JTM) and "Jaysh Ahl al-Sunnah wa’l-Jama’ah" (JASJ) groups which were allied to al-Qaeda during the early Iraqi insurgency. In January 2006, various Islamist insurgent groups (including AQI, JTM and JASJ) formed a coalition known as the Mujahideen Shura Council (MSM).

A few months after the death of al-Zarqawi in June 2006, MSM announced its dissolution and declared the establishment of an independent organization known as the "Islamic State of Iraq" (ISI), under the leadership of Abu Omar al-Baghdadi. ISI participated in the Iraqi insurgency between 2006 and 2011 that sought the end of US occupation of Iraq. In 2010, Abu Omar al-Baghdadi was killed during a military raid by US forces near Tikrit, paving the way for the succession of Abu Bakr al-Baghdadi, who became the second Emir of ISI.

In 2013, Abu Bakr al-Baghdadi declared his intention to forcibly merge Al-Nusra Front (which it claimed to have established and supported) with ISI and announced the formation of "Islamic State of Iraq and the Levant". Alt URL Al-Qaeda Emir Ayman al-Zawahiri denounced the merger proposal and demanded the abolishment of the new organization, publicly declaring that Al-Nusra Front was the branch of al-Qaeda in Syria. Zawahiri's mediation was rejected by al-Baghdadi, resulting in the eruption of armed conflict between IS and al-Qaeda and its allies. In 2014, IS proclaimed itself a worldwide caliphate and changed its name to the Islamic State which in a year grew to control territory with a population of millions. On 27 October 2019, al-Baghdadi killed himself to avoid capture during a U.S. raid in northwestern Syria. By this point, the group had lost its territory in the Middle East, but continued to maintain and even expand its territories in Africa.

Jamāʻat al-Tawḥīd wa-al-Jihād (1999–2004)

The Islamic State of Iraq and the Levant was founded in 1999 by Jordanian Salafi jihadist Abu Musab al-Zarqawi under the name Jamāʻat al-Tawḥīd wa-al-Jihād (). In February 2004, the Coalition officials released a document that they claimed to have captured from an Iraqi "operative", detailing plans to foment a "sectarian war" in Iraq with the help of al-Qaeda's central leadership. US officials accused Zarqawi of writing the letter, although the attribution of the letter remained unverified. While Zarqawi was speculated to have been operating in Iraq during that period, he hadn't pledged allegiance to al-Qaeda leader Osama Bin Laden until October 2004."Zarqawi Letter" State Dept. archives

Colonel Derek Harvey told Reuters that "the U.S. military detained Badr assassination teams possessing target lists of Sunni officers and pilots in 2003 and 2004 but didn't hold them. Harvey said his superiors told him that 'this stuff had to play itself out' – implying that revenge attacks by returning Shi'ite groups were to be expected."Ned Parker, "Torture by Iraqi militias: The report Washington did not want you to see" Reuters, 14 December 2015 Jerry Burke, an adviser to the Iraqi Interior Ministry, said that in 2005 a plan from him and several colleagues to surveil and stop suspected Badr Brigade death squads in the special police forces was rejected when it got to an American Flag (General) Officer.Joel Wing, "Part two of an interview with Jerry Burke Musings on Iraq, 13 February 2012

Tanẓīm Qāʻidat al-Jihād fī Bilād al-Rāfidayn (2004–2006)

In October 2004, when al-Zarqawi swore loyalty to Osama bin Laden and al-Qaeda, he renamed the group Tanẓīm Qāʻidat al-Jihād fī Bilād al-Rāfidayn (), commonly known as al-Qaeda in Iraq (AQI). (See One-sided violence – ISIS-civilians – Actor information-ISIS.) Retrieved 23 September 2016. Although the group never called itself al-Qaeda in Iraq, this remained its informal name for many years. Attacks by the group on civilians, Iraqi government forces, foreign diplomats and soldiers, and American convoys continued with roughly the same intensity. In a letter to al-Zarqawi in July 2005, al-Qaeda's then deputy leader Ayman al-Zawahiri outlined a four-stage plan to expand the Iraq War. The plan included expelling US forces from Iraq, establishing an Islamic authority as a caliphate, spreading the conflict to Iraq's secular neighbours, and clashing with Israel, which the letter said, "[...] was established only to challenge any new Islamic entity".

In January 2006, AQI joined with several smaller Iraqi Sunni insurgent groups like "Jaish al-Ta'ifa al-Mansurah" and "Jaysh Ahl al-Sunnah wa’l-Jama’ah" under an umbrella organisation called the Mujahideen Shura Council (MSC). According to analyst Brian Fishman, the merger was an attempt to give the group a more Iraqi flavour, and perhaps to distance al-Qaeda from some of al-Zarqawi's tactical errors, such as the 2005 bombings by AQI of three hotels in Amman.. On 7 June 2006, a US airstrike killed al-Zarqawi, who was succeeded as leader of the group by the Egyptian militant Abu Ayyub al-Masri.

Islamic State of Iraq (2006–2013)

On 12 October 2006, MSC united with three smaller groups and six Sunni tribes to form the Mutayibeen Coalition, pledging "To rid Sunnis from the oppression of the rejectionists (Shi'ite Muslims) and the crusader occupiers ... to restore rights even at the price of our own lives ... to make Allah's word supreme in the world, and to restore the glory of Islam". A day later, MSC declared the establishment of the Islamic State of Iraq (ISI), comprising Iraq's six mostly Sunni Arab governorates, with Abu Omar al-Baghdadi its emir and al-Masri Minister of War within ISI's ten-member cabinet.

According to a study compiled by United States intelligence agencies in early 2007, ISI planned to seize power in the central and western areas of Iraq and turn it into a Sunni caliphate. The group built in strength and at its height enjoyed a significant presence in the Iraqi governorates of Al Anbar, Diyala and Baghdad, claiming Baqubah as a capital city.

The Iraq War troop surge of 2007 supplied the U.S. military with more manpower for operations, and dozens of high-level ISI members being captured or killed. Between July and October 2007, Islamic State of Iraq was reported to have lost its secure military bases in Al Anbar province and the Baghdad area. During 2008, a series of US and Iraqi offensives expelled ISI-aligned insurgents from their former safe havens, such as the Diyala and Al Anbar governorates, to the area of the northern city of Mosul. Accessible via Google.

By 2008, the ISI was describing itself as being in a state of "extraordinary crisis". Its violent attempts to govern territory led to a backlash from Sunni Arab Iraqis and other insurgent groups and a temporary decline in the group, which was attributable to a number of factors, notably the Anbar Awakening.

In late 2009, the commander of US forces in Iraq, General Ray Odierno, stated that ISI "has transformed significantly in the last two years. What once was dominated by foreign individuals has now become more and more dominated by Iraqi citizens". On 18 April 2010, ISI's two top leaders, al-Masri and Omar al-Baghdadi, were killed in a joint US-Iraqi raid near Tikrit. In a press conference in June 2010, General Odierno reported that 80% of ISI's top 42 leaders, including recruiters and financiers, had been killed or captured, with only eight remaining at large. He said that they had been cut off from al-Qaeda's leadership in Pakistan.

On 16 May 2010, Abu Bakr al-Baghdadi was appointed the new leader of ISI. Al-Baghdadi replenished the group's leadership by appointing former Iraqi military and Intelligence Service officers who had served during Saddam Hussein's rule. These men, nearly all of whom had spent time imprisoned by the U.S. military at Camp Bucca, came to make up about one third of Baghdadi's top 25 commanders, including Abu Abdulrahman al-Bilawi, Ali Aswad al-Jiburi, and Abu Muslim al-Turkmani. One of them, a former colonel called Haji Bakr became the overall military commander in charge of overseeing the group's operations. Al-Khlifawi was instrumental in doing the ground work that led to the growth of ISIL.

In July 2012, al-Baghdadi released an audio statement online announcing that the group was returning to former strongholds from which US troops and the Sons of Iraq had driven them in 2007 and 2008. He declared the start of a new offensive in Iraq called Breaking the Walls, aimed at freeing members of the group held in Iraqi prisons. Violence in Iraq had begun to escalate in June 2012, primarily with ISI's car bomb attacks, and by July 2013, monthly fatalities exceeded 1,000 for the first time since April 2008.

Syrian Civil War

In March 2011, protests began in Syria against the Ba'athist government of Bashar al-Assad. In the following months, violence between demonstrators and security forces led to a gradual militarisation of the conflict. In August 2011, following the outbreak of the Syrian Civil War, al-Baghdadi began sending Syrian and Iraqi Jihadists experienced in guerilla warfare across the border into Syria to establish an organization there. On 23 January 2012, the group took up the name (or al-Nusra Front), operating as an autonomous entity within the transnational Al-Qaeda network and began to establish a large presence in Sunni-majority Raqqa, Idlib, Deir ez-Zor, and Aleppo provinces. Led by a Syrian known as Ahmed al-Sharaa, this group began to recruit fighters and establish cells throughout the country, with popular support among Syrians opposed to the Assad government.

Islamic State of Iraq and the Levant (2013–14)

On 8 April 2013, al-Baghdadi released an audio statement in which he claimed that the al-Nusra Front had been established, financed, and supported by ISI, and that the two groups were merging under the name Islamic State of Iraq and al-Sham (ISIL, Al-Sham also translates as the Levant). However, Ahmed al-Sharaa and Ayman al-Zawahiri, the leaders of al-Nusra and al-Qaeda respectively, rejected the merger. Al-Julani issued a statement denying the merger, and complaining that neither he nor anyone else in al-Nusra's leadership had been consulted about it.