More than 150 Islamic State fighters surrendered to Afghan security forces in the northwestern province of Jawzjan after they were defeated and driven out by the Taliban, Taliban and government officials said on Wednesday.
The defeat represents a major setback for the group, which first appeared in eastern Afghanistan around four years ago and which had gained a foothold in southern Jawzjan, where it fought for control of smuggling routes into neighbouring Turkmenistan.
"The evil phenomenon of Daesh has completely been eliminated and people have been freed from its tortures in Jawzjan province of Afghanistan," Taliban spokesman Zabihullah Mujahid said in a statement, using an Arabic term for the group.
The Taliban launched an offensive several weeks ago in Jawzjan against the group, which they oppose as much as they do the Western-backed government in Kabul and which has established an unmatched reputation for brutality.
Last month, General John Nicholson, the top U.S. commander in Afghanistan, welcomed the fact that the Taliban were fighting Islamic State, which he said had to be destroyed.
U.S. forces have launched air strikes against Islamic State fighters in Jawzjan in recent months, but the Taliban has rejected any suggestion of cooperation and accused the United States of trying to obstruct them.
The fighting prompted thousands of people to flee to the provincial capital of Sheberghan, where many gave shocking accounts of the brutality of Islamic State fighters and commanders in Darzab and Qush Tepa, the two districts they controlled before being driven out.
Mujahid said more than 150 Islamic State fighters had been killed and more than 130 captured by the Taliban with the rest surrendering to government forces rather than the Taliban.
Afghan government officials said 152 fighters from the Islamic State strongholds of Darzab and Qush Tepa surrendered to security forces in the early hours of the morning.
Mawlawi Habiburrahman, commander of Islamic State forces in the north, and another commander called Mufti Nematullah were among those who surrendered, they said.
Bands of Islamic State fighters have been increasingly active in northern Afghanistan in recent years, fighting the Taliban for control of resources and sparking alarm in neighbouring nations.
Government officials said the group's defeat in Jawzjan would ease concerns about its potential to expand and support militant activity outside Afghanistan.
"The worries of neighbouring countries, and the presence of Daesh groups on their borders, have now been removed," said Mohammad Reza Ghafouri, a spokesman for the provincial governor.