ISIS fighters have been defeated at the final shred of territory they held in eastern Syria, marking the end of jihadist rule that once spanned a third of Iraq and Syria, the US-backed Syrian Democratic Forces (SDF) said on Saturday.
This timeline chronicles the lightning rise, cruel reign and gradual fall of ISIS.
* 2004-11 - In the chaos following the 2003 U.S.-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 crisis 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. The jihadists take Mosul and Tikrit in June and overrun the border with Syria. At Mosul's great Mosque, Baghdadi renames the group Islamic State (IS) and declares a caliphate.
So begins a reign of terror.
In Iraq, ISIS slaughters thousands of Yazidis in Sinjar and forces more than 7,000 women and girls into sexual slavery. In Syria, it massacres hundreds of members of the Sheitaat tribe. ISIS beheads Western hostages in grotesquely choreographed films.
In September, the United States builds a coalition against ISIS and starts air strikes to stop its momentum, helping the Syrian Kurdish YPG militia turn the militants back from Kobani on the border with Turkey.
* 2015 - Terrorists in Paris attack a satirical newspaper and a kosher supermarket, the bloody start to a wave of attacks that ISIS claims around the world. Terrorists in Libya behead Christians and pledge allegiance to ISIS, followed by groups in other countries, but they stay operationally independent.
In May, ISIS 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 ISIS had captured during its initial blaze of success. In August, the US-backed Syrian Democratic Forces (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 ISIS and the YPG. Enmity between Turkey and the YPG will continue to complicate operations against ISIS.
* 2017 - ISIS 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 al-Zor 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. The United States vows to withdraw troops.
* 2019 - ISIS fighters are defeated at their last enclave on the Euphrates at the village of Baghouz, the SDF says. The SDF declares the "caliphate" eliminated.