A US-backed alliance of Syrian fighters has announced that the United States and its partners have reclaimed the last territory in Syria controlled by Islamic State (IS) militants.
But who are they, and how did their influence spread?
The extremist Islamist group came to international prominence in 2014 when it seized large parts of Syria and Iraq.
IS imposed its brutal rule on almost eight million people, carried out countless atrocities, destroyed cultural heritage, and generated billions of dollars in revenue from oil, extortion, robbery and kidnapping.
After five years of fierce and bloody battles, local forces, backed by world powers, have driven IS out of all the territory it once controlled.
But the group is by no means defeated. Experts say it will return to its insurgent roots while rebuilding and remains a global threat.
What does it want?
IS is what is widely known as a jihadist group.
Jihadists see violent struggle as necessary to eradicate obstacles to restore God's rule on Earth and defend the Muslim community against what they consider to be infidels and apostates.
IS wants a "caliphate" - a state governed in accordance with Islamic law, or Sharia, by God's deputy on Earth (caliph) - that extends across the Islamic world.
The group justifies its attacks on Muslims and non-Muslims alike by drawing on extreme interpretations of Islamic texts.
What are its origins?
IS grew out of al-Qaeda in Iraq, which was formed by Sunni Muslim militants after the US-led invasion in 2003.
In 2011, the group - by then known as Islamic State in Iraq (ISI) - joined the rebellion against President Bashar al-Assad in Syria, where it found a safe haven. It also took advantage of the withdrawal of US troops from Iraq and Sunni anger at the sectarian policies of its Shia-led government.
In 2013, ISI began seizing territory in Syria and changed its name to Islamic State in Iraq and the Levant (Isis/Isil).
The next year Isis overran large parts of Iraq, proclaimed its leader Abu Bakr al-Baghdadi as caliph, and became known as "Islamic State".
How much land did it control?
At its peak, IS ruled over 88,000 sq km (34,000 sq miles) stretching across the Iraq-Syria border.
Almost eight million people found themselves living according to its interpretation of Sharia. Women were forced to wear full veils, public beheadings were commonplace, children were indoctrinated at school, and Christians had to choose between paying a tax, converting, or death.
Prominent Muslim leaders rejected the IS caliphate, but tens of thousands of foreigners travelled to the region to join.
IS was able to fund its activities with the tens of millions of dollars it generated each month from oil smuggling, extortion, robbery and kidnapping.
The group also provoked outrage by destroying ancient sites and artefacts it considered idolatrous.
How did it lose its territory?
The battle to defeat IS militarily has cost many thousands of lives.
In Iraq, the fight has been led by local security forces, Kurdish Peshmerga fighters and a paramilitary force dominated by Iran-backed Shia militias, the Popular Mobilisation. A US-led global coalition - comprising 74 nations - has provided air support and military advisers.
In Syria, troops loyal to President Assad have battled IS in western and central regions with the help of Russian air strikes and Iran-backed militiamen.
The global coalition has meanwhile backed an alliance of Kurdish and Arab militias called the Syrian Democratic Forces. They have driven IS out of much of the north and east of the country.
Is this the end of IS?
No. It remains a battle-hardened and well-disciplined force whose "enduring defeat" is not assured.
The top US commander in the Middle East has warned it is necessary to maintain "a vigilant offensive" against a group that "retains leaders, fighters, facilitators, resources and the profane ideology that fuels their efforts".
In Iraq, the group has already evolved into a covert network. The UN has said sleeper cells active in rural areas are seeking to undermine government authority, create an atmosphere of lawlessness, and sabotage reconciliation.
IS has suffered substantial losses, but the UN has said it still reportedly controls between 14,000 and 18,000 militants in Iraq and Syria.
Meanwhile, there are significant numbers of IS-affiliated militants in Afghanistan, Egypt, Libya, South-East Asia and West Africa, and to a lesser extent in Somalia, Yemen and the Sahel.
Individuals inspired by the group's ideology also continue to carry out attacks elsewhere.