An Afghan police official says a bomb exploded at a mosque in a western part of Kabul, killing two people, including the prayer leader, and wounding seven.

Jan Agha, a district police official, says the bomb was apparently planted in the microphone used by the mosque leader during Friday prayers.

No militant group immediately claimed responsibility for the attack but both the Taliban and the Islamic State group regularly stage attacks in the country's capital.

The Kabul neighborhood where the bombing took place is dominated by ethnic Pashtuns, most of whom are Sunni Muslims and who make up the backbone of the Taliban movement.