US officials are warning the Islamic State group’s branch in Afghanistan could be in a position to launch attacks abroad in as little as six months time - though the Taliban insist they won’t allow that to happen.
The two groups are fierce rivals. IS is far smaller than the Taliban – but accuses them of not being hard line enough.
In the east of the country a murky and bloody conflict is escalating between the two sides.
The BBC's Secunder Kermani and cameraman Malik Mudassir travelled to the city of Jalalabad for this report.