Here is a recap.
The Islamic State of Iraq and the Levant (ISIL) declared in June 2014 that they had set up a caliphate, under their elusive leader Abu Bakr al-Baghdadi, in territory seized in Syria and Iraq.
Since January that year they had been in control of Syria's northern city of Raqa. They also seized part of the eastern province of Deir Ezzor, on the Iraqi border, as well as positions in the northern province of Aleppo.
In Iraq, they took Mosul and Arab areas bordering the autonomous Kurdistan region in the country's north in June.
Raqa and Mosul became the two de-facto IS capitals.
Rebranded the Islamic State, they carried out beheadings, mass executions, rapes, abductions and ethnic cleansing in Raqa.
Some of the atrocities were broadcast on video, used as a propaganda tool.
In Iraq, IS seized the historic home of the Yazidi minority in Sinjar region in 2014, forcing children to become soldiers and using thousands of women as sex slaves.
In August 2014, US warplanes struck IS positions in northern Iraq.
Washington formed a coalition of more than 70 countries to fight the group in both Iraq and Syria, deploying 5,000 soldiers.
In March 2015, Iraq announced the "liberation" of Tikrit, north of Baghdad.
In November, coalition-backed Kurdish forces retook Sinjar.
In 2016, Anbar provincial capital Ramadi was retaken, as was the city of Fallujah.
In July 2017, then Iraqi prime minister Haider al-Abadi declared the militants' defeat in Mosul.
In August, the last major IS urban stronghold in northern Iraq, Tal Afar, was also freed.
In December, Abadi announced a final victory against the IS.
Kurdish forces drove militants out of the city of Kobane, on the Turkish border, in January 2015.
In August 2016, the US-backed Kurdish-Arab alliance known as the Syrian Democratic Forces (SDF) recaptured Manbij in Aleppo province.
Backed by Turkish forces, rebels retook Jarabulus, and then, in February 2017, Al-Bab, the last IS bastion in Aleppo province.
In March 2017, Syrian troops backed by Russian jets took back the ancient town of Palmyra.
In October 2017, the SDF announced the full recapture of Raqa.
In March 2019, the Kurdish-led SDF proclaimed the defeat of the "caliphate" after seizing Baghouz, the IS's final bastion in eastern Syria.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ