DAMASCUS (REUTERS) - Islamic State in Iraq and Syria (ISIS) faces the total defeat of its self-proclaimed caliphate.
This timeline chronicles its lightning rise, cruel reign and stubborn fall.
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 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 year of sudden success starts by seizing Fallujah in Iraq and Raqqa in Syria at the turn of the year. It takes Mosul and Tikrit in June and overruns the border with Syria. At Mosul's great Mosque, Baghdadi renames it ISIS and declares a caliphate.
So begins a reign of terror. In Syria, it massacres hundreds of members of the Sheitaat tribe. In Iraq, it slaughters thousands of Yazidis in Sinjar and forces more than 7,000 women and girls into sexual slavery. It 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 it back from Kobani on the border with Turkey.
2015: Attackers in Paris strike a satirical newspaper and a kosher supermarket, the bloody start to a wave of attacks that ISIS claims around the world. Militants 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 Ezzor and re-extend state control at the Euphrates. In October, the SDF drives ISIS from Raqqa.
2018: The Syrian government retakes ISIS 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. The US vows to withdraw troops.
2019: ISIS is besieged in its last enclave on the Euphrates at the village of Baghouz.