A bomb exploded on Friday inside a mosque in western Kabul, killing at least four people, including the prayer leader, and wounding eight, an Afghan government official said.
Afghanistan's Interior Ministry spokesman Tariq Arian said that the bomb had been placed inside the mosque but had no additional details.
Police cordoned off the area and helped move the wounded to ambulances and nearby hospitals.
No one took immediate responsibility but a mosque attack earlier this month was claimed by the Islamic State (IS) group’s affiliate.
The Taliban issued a statement condemning the attack and calling the death of the prayer leader a “great crime”.
In a tweet, United States State Department's Bureau of South and Central Asian Affairs condemned the attack.
"We mourn the innocent lives lost and are reminded again that the Afghan people deserve to live free from the persistent threat of terror," it said.
Azizullah Mofleh Frotan was among the city’s more prominent prayer leaders.
Violence has spiked in recent weeks in Afghanistan, with most of the attacks claimed by the IS affiliate, headquartered in the eastern Nangarhar province.
Earlier this month, IS planted explosives at a mosque in Kabul’s posh Wazir Akbar Khan neighbourhood, killing the prayer leader there and wounding eight others.
The US blamed the IS affiliate for a horrific attack last month on a maternity hospital in Kabul that killed 24 people, including two infants and several new mothers.
The hospital was located in the city’s Shia-dominated area of Dasht-e-Barchi.
The IS group, which reviles Shias as heretics, has declared war on the country’s minority Shia Muslims, but has also attacked Sunni mosques. The mosque targeted on Friday is Sunni.
The IS affiliate also took responsibility for an attack on a bus carrying journalists in Kabul on May 30, killing two. It also claimed credit for an attack on the funeral of a warlord loyal to the government last month that killed 35 people.
Washington’s peace envoy Zalmay Khalilzad was in the region earlier this week, trying to resuscitate United States' peace deal with the Taliban, who are expected to eventually be enlisted in the fight against the IS affiliate.
The peace deal signed in February to allow US and Nato troops to leave Afghanistan includes a commitment by the Taliban to fight other militant groups and a vow that Afghanistan’s territory would not be used to attack the US or its allies.
Washington has previously said that the Taliban have been instrumental — along with Afghanistan’s National Security and Defence Forces and US air strikes — in reducing the IS’s strength in eastern Afghanistan.