KABUL, Afghanistan — The Islamic State’s main stronghold in eastern Afghanistan collapsed in recent weeks, according to American and Afghan officials, following years of concerted military offensives from American and Afghan forces and, more recently, the Taliban.
President Ashraf Ghani recently claimed that the Islamic State, often known as ISIS, had been “obliterated” in Nangarhar Province, the group’s haven in the east. And in an interview in Kabul on Sunday, Gen. Austin S. Miller, the commander of all American and NATO forces in Afghanistan, said the group’s loss of the terrain it stubbornly held for few years would severely restrict their recruitment and planning.
But General Miller also warned that ISIS could remain a threat in Afghanistan even if it does not hold territory, with attention required to track militants on the move and the group’s remaining urban cells.
“It is instructable from Iraq and Syria — when you take away big terrain from them, they move into smaller cells and they pop up in strange places,” General Miller said.
General Miller’s reticence to affirm any type of major victory over the offshoot is indicative of the broader inroads Islamic State cells have made in Afghanistan — and of a long history of militant groups in Afghanistan bouncing back after seemingly unsustainable losses.
Western and Afghan officials see a combination of factors that led to the Islamic State’s losses in the east, forcing many of the fighters to either move or surrender. One Western official estimated that the group’s strength was now reduced to around 300 fighters in Afghanistan, from an estimated 3,000 earlier this year.
The Islamic State’s presence in Afghanistan has been cited by military officials and lawmakers as one of the reasons to keep American troops in Afghanistan following any peace settlement with the Taliban. Those officials have long argued that the Taliban would not be able to defeat the group, and that the insurgents still had not done much to distance themselves from Al Qaeda, the terrorist group responsible for the Sept. 11, 2001, terror attacks.
What particularly worried officials was the Islamic State’s continued ability to plan attacks and recruit within Kabul, the Afghan capital city, despite intensified campaigns against the group there. Some of the recruits involved in the planning or execution of deadly bombings there came from the city’s top schools, officials say.
But for Karimullah, a resident of Jawdara, a small village in eastern in Afghanistan where a suicide bombing attributed to the Islamic State killed more than 70 people in October, battlefield victories, political posturing or even the recent death of the Islamic State’s supreme leader, Abu Bakr al-Baghdadi, means little.
“If he’s dead or not, what does it matter?” said Karimullah, who uses just one name and lost his uncle in the blast. “We were destroyed.”
His ambivalence is not uncommon here. To many Afghans, the group’s name or differences from the Taliban are barely noteworthy. But there is no doubt that extreme violence by the Islamic State has become an enduring facet of the war, deepening the already egregious suffering across the country.
The Islamic State has managed to penetrate parts of Afghan society that had been mostly untouched by the broader war for years. And the group’s resilience, even in light of its recent defeats, raises the grim prospect of an unending war even if the Taliban negotiate a peace.
Far from the central ISIS branch in Iraq and Syria, the Islamic State in Afghanistan started as a collection of disenfranchised Pakistani Taliban fighters who pledged allegiance to Mr. al-Baghdadi in early 2015. It has since slowly turned into a formidable threat in Afghanistan’s mountainous east, with a reach that extends across the country, including in Kabul, the capital.
Though the Islamic State in Iraq and Syria sent money to its Afghan affiliate to support its initial growth, the connection between the two groups is minimal, said Arian Sharifi, who was the director of threat assessment of the Afghan National Security Council until late last year.
One of the group’s goals, officials say, is to hold territory in Afghanistan and elsewhere in south and Central Asia, trying to establish a caliphate much like the group’s earlier iteration in the Middle East.
Mr. Sharifi thinks that the Islamic State in Afghanistan will try to become the group’s global hub in the coming years, after losing territory in Iraq and Syria following concerted Western-backed offensives and airstrikes.
The Afghan government noted that more foreign fighters were slowly arriving in Afghanistan to fight for the group there as the central branch lost territory in Iraq and Syria, an assessment supported by American intelligence officials.
But, Mr. Sharifi cautioned, “The Islamic State in Afghanistan is much less ideological than its Middle Eastern counterparts,” he said in a recent interview. “It is very much influenced by regional politics as well.”
American officials have been divided over how much global threat the Islamic State in Afghanistan poses. While military officials emphasize the group’s ambitions, some intelligence officials believe the group remains more of a threat within the immediate region.
One thing the Afghan branch shares with the central body is a hatred of Shiite Muslims, and a tendency to single them out for attacks. Still, the militants are not exclusive with their violence, as was the case in Jawdara, a mostly Sunni village.
There, Karimullah and some other residents think it was more personal: The village had stood up to the Islamic State in a dispute over the town’s water supply, and they believe the mosque bombing was meant to break their spirit.
In its early days, the Islamic State in Afghanistan distinguished itself from other terrorist organizations operating in Afghanistan, including Al Qaeda, by taking another cue from counterparts in Iraq and Syria: Its media arm distributed gruesome videos of beheadings and fighters forcing victims to sit on explosives before detonating them.
But when the Islamic State detonated a suicide bomb in a wedding hall in Kabul over the summer, killing 63 people, there was little mention of ideology or local aims.
“I think ISIS is just a name in Afghanistan,” said Hajji Hussain, the owner of the wedding hall. “We don’t know who they are, and we can’t trust anyone.”
He added, “They just enjoy killing people.”
And that is what makes the Islamic State stand out in Afghanistan’s unending war. The Taliban often try to justify or disown attacks that killed civilians, Mr. Sharifi said.
The Islamic State, he added, does not bother.
While the number of Islamic State attacks declined in recent months, according to United Nations data, American officials attributed more than 20 high-profile attacks in Kabul alone last year.
For years, American and Afghan Special Operations forces, on the back of a relentless airstrike campaign, had kept the pressure to try to contain the group. The Taliban, also, increased their operations against the group in Nangarhar, according to Western and Afghan officials. Some reports claimed that the insurgents had sent some of their elite units to the province to strike at the Islamic State.
The timing of the Taliban intensifying its offensives against ISIS was particularly interesting, as the insurgents tried to persuade the Americans in peace negotiations that they would act against international terrorist groups.
But following any peace agreement, the number of hard-line insurgents defecting to the Islamic State to keep fighting has been a concern among Afghan and western officials.
But still, with the group constricting, its damage to Afghanistan, by way of cruel bombings in the capital and rampant death among innocents, has reshaped Afghans’ understanding of violence, a trauma that will linger for years to come.
Reporting was contributed by Fatima Faizi from Kabul, Zabihullah Ghazi from Jalalabad, and Asad Timory from Herat.