The death toll from a suicide bombing at a Shia mosque in the Afghan capital Kabul has risen to 39, with another 41 people wounded.

The interior ministry is investigating the attack a day earlier at the Imam Zaman Mosque in western Kabul's Dashte-e-Barchi area.

It said the assailant blew himself up as worshippers began their prayers.

A second suicide bombing in western Ghor province on Friday struck a Sunni mosque, also during Friday prayers, and killed 33 people including a warlord who was apparently the target of the attack.

Abdul Hussain Naseri, a Shia cleric, condemned the Kabul attack and said more security is needed for Shia mosques in the city.

Islamic State (IS) is claiming responsibility for the attack.

The group said its fighter "Abu Ammar al-Turkmani detonated his explosive vest among the apostates" in the Imam Zaman mosque.

IS has staged similar attacks on Shia mosques in recent months.

The so-called Islamic State in Afghanistan has taken responsibility for most of the attacks targeting Shias, whom the Sunni extremist group considers to be apostates.

Earlier this year, following an attack claimed by IS on the Iraqi Embassy in Kabul, the militant group effectively declared war on Afghanistan's Shias, saying they would be the target of future attacks.