Islamic State (IS) jihadists, who in 2014 conquered swathes of territory in Syria, have been wiped out by offensives led by the regime, but also by a US-backed Arab-Kurdish alliance.
They now hold just a few pockets in the Syrian desert.
US President Donald Trump on Wednesday ordered a full withdrawal of US troops from Syria, saying the US-led anti-jihadist coalition had defeated IS.
Below are key dates since the emergence of the group.
On January 14, 2014, jihadists of the Islamic State of Iraq and the Levant (ISIL) seize the northern city of Raqa, some 90 kilometres (55 miles) south of the Turkish border and about halfway between Syria's second city Aleppo and the Iraqi frontier.
In June, ISIL proclaims a "caliphate" led by Abu Bakr al-Baghdadi across territory the group seized in Syria and Iraq and rebrands itself the Islamic State.
The group takes full control of Raqa province in August.
A US-led military coalition launches its first strikes on Raqa in September, hitting IS targets.
In October 2017, a US-backed Arab-Kurdish alliance known as the Syrian Democratic Forces (SDF) announces the full recapture of Raqa city, the capital of the eponymous province, after more than four months of fierce fighting.
The battle killed at least 3,250 people, including 1,130 civilians, and displaced tens of thousands of residents, according to the Britain-based Syrian Observatory for Human Rights war monitor.
The Kurdish city Kobane in northern Syria became a symbol of the fight against IS and is where the jihadists faced their first major defeat.
Backed by US-led air strikes, Kurdish forces drive the jihadists out of the city in January 2015 after more than four months of fighting.
In August 2016 the SDF recaptures Manbij following a two-month battle.
IS had seized the town -- in Aleppo province, some 100 kilometres from the Turkish border -- in 2014 and used it as a hub for moving jihadists to and from Europe. It also controlled a key IS supply route.
Backed by the Turkish tanks and air force the SDF then retakes Jarabulus.
In October, Syrian rebels backed by Turkish warplanes and artillery capture Dabiq.
Under IS control since August 2014, Dabiq has ideological significance because of a prophecy that Christian and Muslim forces will battle there at the end of times.
Turkish-backed Syrian rebels say in February 2017 that they have taken full control of the northern town of Al-Bab, the last IS bastion in Aleppo province, after three months of deadly fighting.
Syrian troops backed by Russian jets recapture the ancient desert town of Palmyra from IS in March 2017.
The oasis city had traded hands several times during the war and becomes a symbol of the jihadists' destruction of priceless cultural heritage in areas under their control.
In May 2018 Syria's army says it is in complete control of Damascus and its outskirts for the first time since 2012, after ousting IS jihadists from the capital's south, including the Palestinian refugee camp of Yarmuk.
On November 17 regime forces retake the southern area of Tulul al-Safa as the jihadists pull back into the desert after months of fighting.
In October 2017, regime forces retake Mayadeen in the oil-rich eastern Deir Ezzor province.
In November, Syria's army backed by Russian and Iranian forces expels IS from Deir Ezzor city and Albu Kamal, the last town in Syria still held by IS on the Iraqi border.
In early May the SDF says it is launching the final stage of its battle to expel IS from desert holdouts in the province.
In late October the SDF is forced to retreat after deadly IS counterattacks. The alliance then announces a temporary halt to the offensive after the Turkish army shells Kurdish positions in northern Syria.
Ten days later the SDF resumes operations in Deir Ezzor. On December 14, the Arab-Kurdish alliance drives IS from Hajin near the Iraqi border, confining the jihadists to the towns of Sousa and Al-Shaafa.
They also retain a presence in the vast Badia desert, a front that is managed by Russia-backed regime forces.