"The explosion happened when the worshippers were inside the mosque", the Khaama Press quoted Ghor governor's spokesman Abdul Hai Khatibi as saying.
He said the suicide bomber blew himself up among the worshippers.
Thirty-nine people were killed and 45 others wounded, Interior Ministry spokesman Najib Danish said on Twitter.
Soon after the blast, he said, security forces reached the area and started evacuating the dead and wounded to hospitals.
Police initially said a gunman entered the Imam Zaman mosque in a heavily Shiite neighbourhood in the west of the city and opened fire on worshippers.
Nivea Sparks Outrage With Skin Lightening Ads In Africa
She continued, condemning whitening and lightening creams, saying they're not only physically damaging, but also ethically wrong. The "Natural Fairness Lotion" ad tells Black women that their product can help "restore her skin to its natural fairness".
White nationalist Spencer drowned out by protesters
Alt-right organization the National Policy Institute, of which Spencer is president, is paying the $10,564 to rent the UF space. University administrators had initially wanted to deny Spencer the chance to speak but ultimately had to relent.
Federal Bureau of Investigation probing Guptas over cash flows
The FCA said: " The FCA is already in contact with both banks named and will consider carefully further responses received ". The FBI in the US has begun a probe into the Guptas, investigating their links with American companies.
The Ministry of Public Health said in a statement that numerous wounded are in critical condition.
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.
Recent attacks have mostly been carried out by ISIS, though again they are generally quick to claim responsibility, and they are far from the only group in and around Afghanistan that targets Shi'ites as a matter of course.
Eyewitnesses told local media that more than 30 people had been killed and around 50 others wounded in the attack but those figures could not be immediately verified.
Afghanistan witnessed many attacks on mosques in the past few months.