"When the dust settled down, I saw the mosque was full of flesh and blood. I was injured in my waist and had to crawl out of the mosque."

Another worshipper, Ali Jan, told AFP: "I was in the mosque, the people were offering prayers. Suddenly I heard a bang and windows broke. I had no idea what had happened. I rushed out screaming."

The worshippers were gathering for the major Shiite ceremony of Arbaeen marking the end of a 40-day mourning period after Ashura, which commemorates the death of Imam Hussein.

Hussein, grandson of the Prophet Muhammad, was assassinated in the year 680. His fate laid the foundation for the faith practised by the Shiite community, a minority in mainly Sunni Muslim Afghanistan.

The death toll given by Obaidi was confirmed by a health ministry spokesman. Women and children were among the wounded.

Interior ministry spokesman Sediq Sediqqi said the blast happened around 12.30 pm (0800 GMT). Police cordoned off the area as ambulances rushed to the scene.

President Ashraf Ghani said in a statement he strongly condemned the "barbaric" attack, which the UN called an "atrocity".

NATO commander in Afghanistan General John Nicholson offered condolences and the US embassy in Kabul also condemned the blast, which Amnesty International called "horrific and deliberate".

"(Afghan authorities) have a duty to take effective measures to protect Shia Muslims from attacks and end impunity for previous abuses against the Shia community," said Champa Patel, Amnesty's South Asia director.

- Taliban deny role -

Mosques in Kabul generally do not have any security -- though police patrols can be seen near some on Fridays -- and some eyewitnesses criticised the government over the lack of protection.

"They know that Daesh (IS), who is able to conduct attacks in Europe, can reach places in Afghanistan easily. They should provide security to sacred places," said one man who gave his name as Rahmat.

No group has yet claimed responsibility for Monday's blast. The Taliban, who are waging a bloody war to topple the US-backed Afghan government, said they were not involved in the attack.

Earlier this year a powerful blast targeting Shiites during Ashura killed 14 people in northern Afghanistan. It followed twin attacks claimed by the Islamic State group, that also targeted Shiites and killed 18 in Kabul.

In July IS jihadists claimed responsibility for twin explosions that ripped through crowds of Shiite Hazaras in Kabul, killing at least 85 people and wounding more than 400 others.

Those bombings marked the deadliest single attack in the Afghan capital since the Taliban were ousted from power in a 2001 US-led invasion.

Millions of Shiite Muslim pilgrims gather each year in the holy Iraqi city of Karbala for the Arbaeen pilgrimage, one of the world's largest religious events. Officials there have said they expect up to 20 million visitors this year.

The pilgrimage is seen as a major potential target for sectarian attacks.