ISIS has claimed responsibility for the attack on Taliban police personnel in Faizabad city, the capital of Badakhshan province.
In their statement, ISIS said that "12 Taliban militants" were killed and wounded in the assault.
The Taliban confirmed the deaths of three of their security personnel.
The Taliban's Ministry of Interior confirmed on Wednesday that an improvised explosive device (IED) planted in a motorcycle exploded.
The Taliban's spokesperson for the Ministry of Interior stated that the explosion occurred as Taliban police forces were passing through the area to eradicate poppy crops.