One bomber walked into a Shiite Muslim mosque in the capital Kabul as people were praying on Friday night and detonated an explosive, one of the worshippers there, Mahmood Shah Husaini, said.
At least 39 people died in the blast at the Imam Zaman mosque in the city’s western Dasht-e-Barchi district, interior ministry spokesman Najib Danish said.
Daesh has claimed responsibility for the attack, but a statement from the group did not provide evidence to support its claim.
Shiite Muslims have suffered a series of attacks in Afghanistan in recent months, many of them claimed by the Sunni Muslim militants of Daesh.
Separately, a suicide bombing killed at least 33 people at a mosque in central Ghor province, a police spokesman said.
The attack appeared to target a local leader from the Jamiat political party, according to a statement from Balkh provincial governor Atta Mohammad Noor, a leading figure in Jamiat.
No one immediately claimed responsibility.