With the self-declared "caliphate" of the "Islamic State of Iraq and Syria" (ISIS) disintegrating in the Middle East, analysts say support for the terrorist group is crumbling in Afghanistan, Pakistan, Central Asia and elsewhere.
ISIS declared its short-lived caliphate in 2014 after seizing control of large swathes of territory in Iraq and Syria.
But after a series of debilitating losses, only gaggles of its fighters remain in Syria, launching ineffective attacks or clinging to small pockets of territory where they are completely besieged.
Iraqi Prime Minister Haider al-Abbadi declared victory over ISIS December 10.
"Our forces are in full control of the Iraqi-Syrian border, and I therefore announce the end of the war against ISIS," he said in a televised address. "Our enemy wanted to kill our civilisation, but we have won through our unity and our determination."
In Syria, the group is headed towards the same fate, observers say.
ISIS is now largely rudderless and its surviving units are fending for themselves, said Rami Abdul Rahman, head of the Syrian Observatory for Human Rights, a United Kingdom-based monitoring group.
"There no longer is one central command giving orders," said Rahman, who has been tracking the conflict in Syria since the start of the civil war. ISIS remains only in small groups scattered over Syria, he said.
With the collapse of the ISIS "caliphate" in Iraq and Syria, officials and analysts are shifting their gaze to what that situation means for the future of ISIS in other parts of the world.
For Afghanistan, where Afghan National Defence and Security Forces (ANDSF) and coalition forces are actively fighting ISIS's Khorasan branch, the defeat of the terrorist group in Iraq and Syria might portend an influx of fighters into Afghan territory.
"After ISIS started facing defeats in Iraq and Syria, there have been many concerns regarding its relocation to Afghanistan," said Col. (ret.) Mohammad Anwar Sultani, a military affairs analyst in Jalalabad, Nangarhar Province.
Earlier this month, AFP reported that French and Algerian fighters, some arriving from Syria, had joined the ranks of ISIS in Jawzjan Province.
These foreign fighters might be heading for Afghanistan after being driven out of Syria and Iraq, analysts say.
Nevertheless, ANDSF and coalition operations have severely reduced ISIS's capabilities over the past two years, putting security forces on good footing to deal with new militants.
ISIS insurgents are on their last legs in Afghanistan, Sultani said. "[They] no longer have connections with Iraq or Syria, and the international community has destroyed or stopped their sources of funding."
"ISIS no longer has the capabilities it had before because the United States, international community and Afghanistan fought a good fight against this group," he said.
Residents of Kunar and Nangarhar provinces no longer fear ISIS, "because its presence has become limited and because an international campaign continues against its", he said.
The collapse of ISIS's "caliphate" will cause the group's supporters in Pakistan to falter as well, analysts say.
"ISIS's defeat in Iraq and Syria is a serious blow for its supporters in Pakistan," said Lt. Gen. (ret.) Talat Masood, a military and defence analyst in Islamabad.
Such sympathisers had sought out ISIS "for economic and physical survival", but the group's defeat in Iraq and Syria means "there will be no financial and material support coming to them anymore from ISIS", he said.
"The ISIS structure in this region will also collapse," Masood said.
"The defeat in Iraq and Syria will ultimately be a clear indication of the fall of ISIS in the Pakistan-Afghanistan region," said Aqeel Yousafzai, a Peshawar-based senior journalist and security analyst.
"Some Tehreek-e-Taliban Pakistan [TTP] supporters and members of other militant groups who had announced their allegiance to [ISIS leader Abu Bakr] al-Baghdadi [will no longer support ISIS] as they had no ideological affiliation to it and had supported it for their own interests and needs," he said.
"These few remaining supporters of ISIS will further [be dealt] a serious blow in Pakistan and Afghanistan [if the two countries] join hands to crush the common enemy," he said.
Pakistan has previously been successful in defeating terrorism in Malakand Division, Khyber Pakhtunkhwa (KP), and in the Federally Administered Tribal Areas (FATA), said Brig. (ret.) Mehmood Shah of Peshawar, former security secretary for FATA.
"Therefore, defeating remnants of ISIS [in Pakistan and Afghanistan] after their announced defeat in Iraq and Syria is guaranteed," he added.
Meanwhile, in Central Asia the primary concern is the potential return of citizens who had left to fight alongside ISIS in Syria and Iraq.
The defeat of ISIS in Syria and Iraq "will, without a doubt, have an impact on Central Asia", said Murat Telibekov, head of the Union of Muslims of Kazakhstan in Almaty.
"It's very likely that militants right now are looking for another staging ground," he said. "It's not impossible that Central Asia could become such a place."
"It's bad when you have a hot spot of instability that turns into a breeding ground and safe haven for radicals," said Kairat Osmonaliyev, a law professor in Bishkek and member of the Central Election Commission of Kyrgyzstan. "After you wipe out that hot spot, you run the risk of having the surviving [militants] set up shop somewhere else."
"Central Asian nationals [fighting in Syria] might try to come home via Turkey and Afghanistan," he said. "Our security agencies already have evidence that they are seeping in."
"Where will they go?" asked Talgat Ismagambetov, an Almaty-based political analyst, about remaining ISIS fighters.
"To Afghanistan or somewhere else, or will they go home? What kind of internal [instructions] will they receive from the remaining [militant] hierarchy? How strong is their external support?" he added.
"The bad part is that some militants will return. They have to be watched," said Ismagambetov. "But there's good news too. For the time being, our region is not yet the centre of attention of the Islamist international movement."
[Khalid Zerai from Nangarhar, Muhammad Ahil from Peshawar, and Arman Kaliyev from Bishkek and Almaty contributed reporting.]