Taliban forces fought a three-hour gun battle with a group of alleged Islamic State kidnappers on Sunday, killing three of them, officials said.
The clash erupted in the western Afghan city of Herat when the new Taliban government's fighters cornered the gang in a high-rise building, Herat Police Command said in a statement.
Local residents said they heard light and heavier weapons used in the fighting. Police said three Islamic State members were killed and two Taliban were wounded in the clash.
Videos circulating on social media appeared to show that at least one suspect was shot dead after he had been detained and disarmed, during a scuffle with his captors.
The footage also showed victorious Taliban forces driving through town with three corpses exposed on the back of a pick-up truck, as cheering supporters followed on scooters.
Interior ministry spokesman Qari Sayed Khosti tweeted the three Islamic State-Khorasan (IS-K) members were involved in major kidnappings across Herat province.
"Special forces surrounded them, and they started firing. The men were killed in a shootout with security forces."
The Taliban seized power in Afghanistan in mid-August, overthrowing the previous US-backed government, and have vowed to restore stability after a 20-year war.
But their efforts have been undermined by a series of attacks claimed by IS-K, another hardline Sunni Islamist group that has a bitter rivalry with the Taliban.
We want to hear your views on the news. Subscribe to News24 to be part of the conversation in the comments section of this article.