An Afghan official says an Islamic State of Iraq and Syria (ISIS) suicide bomber has killed 20 people in northern Afghanistan, including a Taliban commander. Abdul Qayuom Baqizoi, provincial chief police of northern Sar-i-Pul province, said the attack Tuesday took place as village elders met with Taliban officials in the area.

In northern Afghanistan, Taliban and the ISIS faction in the country have been waging bitter battles in recent days. As many as 100 insurgents from both the Taliban and ISIS have perished in recent battles, said Baqizoi.

Provincial council chief Mohammed Noor Rahman said the explosion occurred in a mosque as a funeral was taking place. Reports from regional journalists also spoke of a bombing in neighboring Jawzjan province targeting Taliban elders.

Get Breaking News Delivered to Your Inbox

The area is remote and it was impossible to reconcile the differing accounts.

Last month an ISIS suicide bomber blew himself up in eastern Afghanistan as mostly Taliban fighters gathered to celebrate a three-day cease-fire with Afghan government forces marking the Islamic holiday of Eid al-Fitr. That blast killed at least 25 people, according to local officials.

The two Islamic extremist groups have been at each others' throats in Afghanistan for several years, battling for territory as the Taliban rejects ISIS' calls to establish an Islamic "caliphate," ruled under a harsh interpretation of shariah law, in the war-torn country.

The U.S. military continues to support Afghan forces in their fight against both ISIS and the Taliban, but American commanders respected the Afghan government's brief truce with the Taliban in June. The fight against ISIS Khorasan, the group's Afghan branch, never let up.