Afghan soldiers and supporters carry the coffin of Samiullah Raihan, a prayer leader and a religious scholar, during his funeral in Jalalabad, Afghanistan, on Saturday. (Ghulamullah Habibi/EPA-EFE/Shutterstock)

The killing of a prominent pro-government cleric in a mosque bombing has left the Afghan capital shaken and prompted U.N. officials Saturday to denounce a marked escalation of civilian casualties during the Muslim holy month of Ramadan.

Samiullah Raihan, a Sunni Muslim preacher who often appeared on television and condemned violence as not Islamic, was killed Friday while leading weekly prayers in the Al Taqwa mosque. A hidden explosive device detonated in the sanctuary.

Kabul police said Raihan and three worshipers were killed and at least 16 people were injured. No group has claimed responsibility for the blast, but it came amid a surge in attacks by Taliban insurgents and Islamic State militants, both in rural areas and high-profile urban settings. 

“Deliberate and indiscriminate attacks against civilians . . . amount to war crimes,” Tadamichi Yamamoto, the U.N. special representative for Afghanistan, said in a statement. “An attack in a mosque, especially at a time of prayer during Ramadan, is particularly heinous.” 

The bombing followed a protracted spate of violence hitting civilians as well as security forces. It has seen no letup during Ramadan, when Muslims fast from dawn to dusk and are encouraged to avoid provoking others. The violence also has coincided with meetings between Taliban and U.S. officials seeking a settlement to end the war.

Civilian casualties have remained high for several years. Between January and March, the United Nations said 581 civilians were killed and 1,192 were injured in conflict situations. That was lower than the same period last year, it said, but worrisome because more deaths were caused by pro-government attacks and airstrikes. Earlier this month, U.S. airstrikes in two embattled provinces mistakenly killed 14 civilians and 17 Afghan police. 

Yamamoto lamented the “recent intensification of conflict” that has continued to take a “heavy toll” on civilians, and he urged “every party to redouble efforts” to protect them.

In the eastern Nangahar province, a raid by Afghan security forces against Taliban fighters mistakenly killed at least six civilians, including two children, provincial officials said Saturday, the Associated Press reported.

Attahullah Khogyani, the provincial governor’s spokesman, said 10 insurgents were also killed in the Friday night attack in Sherzad district.

In Kabul on May 8, a brazen insurgent attack on a building used by a U.S.-based development agency left nine people dead.

But the death of Raihan came as a personal shock to many Afghan Muslims who admired his stance against terrorism and violence.

The Islamic State has often attacked Shiite mosques, but assaults on Sunni targets are rare. The Islamic State and Taliban are Sunni groups. Security sources said Raihan had recently received death threats and traveled in an armored government vehicle. On Saturday, his body was flown by military helicopter to eastern Jalalabad city, his home base, for burial services.

“Mawlawi Raihan’s valor in the face of religious extremism, intolerance and misuse of Islam by terrorists was unmatched,” Javed Faisal, a former government spokesman, posted online Friday.

On Saturday, outside the heavily damaged mosque in a gritty industrial zone, dozens of men watched grimly while a Kabul TV crew filmed the scene. One factory worker named Isaak, 25, said he had just entered the mosque Friday when the bomb went off and people stampeded out.

Raihan, he said, “spoke the truth and said Muslims should not behave badly with others. He said the Taliban were not good because they kill innocent people.”

In an online video of his preaching, Raihan criticized the Taliban for vowing to disband the army.

“I am proud of my army, proud of my security, proud of my police,” Raihan said in Pashto. “I belong to this country. This is my homeland. I will live here and I will die here.”

Sayed Salahuddin and Sharif Hassan contributed to this report.