KABUL, Afghanistan — Overnight, a small garden of pink and red roses at a Shiite mosque in Kabul was turned into a cemetery.

Before Friday, old men had often lingered in the garden, thumbing their prayer beads or making small talk before entering the worship hall. But on Saturday, some of those men were buried in the garden, some with their wives, all victims of a terrorist attack.

The exact death toll from the attack on the Imam Zaman mosque, which lasted nearly four hours, is unclear. The Afghan Independent Human Rights Commission put the number of dead at 40 and said 90 people were wounded. Congregation members said at least 40 people had been killed and possibly more than 50.

At least six attacks on Shiite places of worship in Afghanistan have left more than 80 dead this year. The Islamic State group has claimed responsibility for many of those attacks, including the one on Friday.