The rise and fall of Islamic State in Iraq and Syria: A brief timeline
Islamic State (IS) fighters have been defeated in the final small area of territory they held in eastern Syria, marking the end of a period of rule that once spanned a third of Iraq and Syria, US-backed Syrian Democratic Forces (SDF) said on Saturday.
Below chronicles the lightning rise, reign and gradual fall of the group.
2004-11 - In the chaos following the 2003 US-led invasion of Iraq, an al-Qaeda offshoot sets up there, changing its name in 2006 to Islamic State in Iraq.
2011 - After Syria's civil war begins, the group's leader Abu Bakr al-Baghdadi sends operatives there to set up a Syrian subsidiary. Baghdadi follows in 2013, breaking with al-Qaeda and renaming his group The Islamic State in Iraq and the Levant.
2014 - Its sudden success starts with the seizure of Fallujah in Iraq and Raqqa in Syria at the turn of the year. IS fighters take Mosul and Tikrit in June and overrun the border with Syria. At Mosul's Great Mosque, Baghdadi renames the group Islamic State and declares a caliphate, calling on all Muslims everywhere to "obey" him.
Raqqa and Mosul become IS's two de-facto capitals.
In Iraq, IS kills thousands of Yazidis in Sinjar and forces more than 7,000 women and girls into sexual slavery. Many Yazidi children are recruited as child soldiers. In Syria, it massacres hundreds of members of the Sheitaat tribe. Several Western hostages are beheaded.
In August 2014, US warplanes strike IS positions in northern Iraq.
Washington then forms a coalition of more than 70 countries to fight the group in both Iraq and Syria, deploying 5,000 soldiers.
The air strikes begin to stop IS's momentum, helping the Syrian Kurdish YPG militia turn the fighters back from Kobani on the border with Turkey.
2015 - Militants in Paris attack a satirical newspaper and a kosher supermarket, the bloody start to a wave of attacks that IS claims responsibility for around the world. Fighters in Libya behead Christians and pledge allegiance to IS, followed by groups in other countries, but they stay operationally independent.
In May, IS takes Ramadi in Iraq and the ancient desert town of Palmyra in Syria, but by the end of the year it is on the back foot in both countries.
2016 - Iraq takes back Fallujah in June, the first town IS had captured during its initial blaze of success. In August the SDF, spearheaded by the Kurdish YPG, takes Manbij in Syria.
Alarmed by the Kurdish advances near its own frontier, Turkey launches an offensive into Syria against both IS and the YPG. Enmity between Turkey and the YPG will continue to complicate operations against IS.
2017 - IS suffers a year of catastrophic defeats. In June, it loses Mosul to Iraqi forces after months of fighting and Baghdad declares the end of the caliphate. In September, the Syrian army races eastwards backed by Russia and Iran to relieve Deir Ezzor and re-extend state control at the Euphrates River. In October, the SDF drives IS from Raqqa.
2018 - The Syrian government retakes IS enclaves in Yarmouk, south of Damascus, and on the frontier with the Israeli-occupied Golan Heights.
The SDF advances further down the Euphrates and Iraqi forces take the rest of the border region. In December, US President Donald Trump vows to withdraw troops from Syria.
2019 - IS fighters are defeated at their last enclave on the Euphrates at the village of Baghouz, the SDF says. The SDF declares the "caliphate" eliminated.