KABUL, Afghanistan — A suicide bomber targeted a gathering of Afghan religious scholars who were meeting on Monday to condemn such attacks, and the authorities said at least 12 people were killed.

The attacker detonated a device near a large tent in the Afghan capital where thousands of clerics had met to call for an end to the violence, said Hashmatullah Stanikzai, a spokesman for the Kabul police.

Officials said that at least 17 people were wounded in the attack.

As many as 3,000 clerics had gathered for the council. Only an hour before the attack, they had declared suicide bombing un-Islamic and said there was no religious justification for such violence.

“Using humans, the noblest of all creatures, as a tool of war is a disrespect to humanity,” the clerics said in a proclamation read moments before the bombing.