Ghafor Aziz, police chief of Kabul's 5th District, said the bomber struck near the entrance of a compound where the religious body, known as the Afghan Ulema Council, was meeting. It was not clear how many of the clerics were among those killed or wounded.
No one immediately claimed responsibility for the attack. Interior Ministry spokesman Najib Danish said one policeman was among those killed and two were among the wounded. Public Health Ministry spokesman Wahid Majroh said the 20 wounded were taken to different hospitals and that the toll could rise.
Around 2,000 members of the council had gathered for the meeting, which was held beneath a large, traditional tent. Aziz said the bomber struck near the end of the meeting, as the participants were about to leave.
Shortly before the attack, the clerics had issued an Islamic ruling, or a fatwa, declaring that suicide attacks are "haram" — forbidden under Islamic law. The council called on the government, the Taliban and other militants to halt the fighting and enter peace negotiations. It was the first time in the 17-year war that the council has issued such an appeal.
Less than an hour before the attack happened, Ghofranullah Murad, a member of the council, read out a written statement from the gathering. "The ongoing war in Afghanistan is illegal and has no root in Sharia (Islamic) law," the statement said. "It is illegal according to Islamic laws and it does nothing but shed the blood of Muslims."
"We the religious Ulema call on the Taliban to respond positively to the peace offer of the Afghan government in order to prevent further bloodshed in the country," it added. The fatwa also said that killing people by any means — such as bombs and suicide attacks — as well as violent acts like robbery and kidnapping, are sins in Islam.
Hours after the meeting, the Taliban issued a statement saying that their jihad, or holy war, in Afghanistan is legitimate because it is being waged against U.S. invaders and their supporters. It called the Ulema meeting "an American process, which was planned, organized, financed and led by the invaders." It urged the clerics to instead side with the Taliban against the "occupation."
The Taliban nevertheless denied involvement in the attack. A powerful Islamic State affiliate has carried out a wave of attacks in recent months, and would also have been opposed to the fatwa. U.N. Secretary-General Antonio Guterres condemned the attack and reiterated that "no cause can justify such violence," U.N. spokesman Stephane Dujarric said. "Targeting civilians in this way is a clear violation of international law," he added.
Elsewhere in Kabul, three civilians, including a woman, were wounded when a sticky bomb attached to their car went off in the Koti Sangi area on Monday, said Hashmat Stanekzai, spokesman for the Kabul police chief.
The Taliban in April announced the start of their annual spring offensive, but in recent years, both the Taliban and the IS affiliate have carried out near-daily attacks through all seasons. The Taliban have managed to seize control of several districts across the country and regularly target Kabul, the capital.
Both militant groups seek to overthrow the U.S.-backed government and impose a harsh version of Islamic rule, but they are split over leadership, tactics and ideology. Their relentless assaults underscore the struggles that Afghan forces have faced since the United States and NATO concluded their combat mission in Afghanistan at the end of 2014.
Thousands of American troops remain in Afghanistan in a counterterrorism and supporting role. The Trump administration has sent additional troops to try to change the course of America's longest war.