The ministry of interior confirmed at least 39 people were killed and 45 wounded in the Imam Zaman Mosque attack in Dasht-e-Barchi in Kabul city on Friday evening.
The mosque is located close to Pul-e-Khoshk Square in Dasht-e-Barchi in the west of Kabul City.
The explosion occurred at around 6pm when the worshippers were doing the evening prayer.
Eyewitnesses told TOLOnews that the number of wounded was more than 50.
The eyewitnesses said the suicide bomber was in the middle of the mosque among the worshippers when he detonated the explosives embedded with his body.
According to an eyewitness, women and children were also among the victims of the attack.
Interior Ministry spokesman Najib Danish said in a post on social media that based on initial reports, 20 people were killed and 40 others were wounded in the mosque attack.
Security forces cordoned off the area one hour after the explosion.
The Ministry of Public Health said in a statement that many of the wounded are in critical condition.
Many people were chanting slogans against insurgents outside the mosque few hours after the attack.
President Ashraf Ghani in a statement sent hours after the incident condemned the attacks on Kabul and Ghor mosques and called them inhuman and against the values of Islam.
The president said the attacks were aimed at creating division among the people, adding that these nefarious acts will not yield any result and will not affect the unity of Afghans.
Daesh has claimed responsibility of the attack.
This attack occurred just hours after an explosion close to a mosque in Daleema district in Ghor province in which at least 10 people were killed and many other were wounded.
Afghanistan witnessed many attacks on mosques in the past few months.
In August, more than 30 people lost their lives in a coordinated militant attack in Imam Zaman Mosque in Qala-e-Najarha area in Kabul’s PD15.
Another attack on al-Zahra Mosque in Herat province, in the west of Afghanistan, killed at least six people and wounded many others.