The assault on the Jawadya mosque in Herat, which is close to Afghanistan's border with Iran, came a day after the Islamic State (IS) group claimed a deadly attack on the Iraqi embassy in Kabul.
"More than 20 bodies, and more than 30 wounded have so far been brought to the hospital," after the mosque attack, Rafeeq Shirzai, a spokesman for the hospital, said.
Afghan forces lose 2,531 killed from Jan 1-May 8 says report
Herat police spokesman Abdul Ahad Walizada said the assault happened around 8:00pm (1530 GMT) when "a terrorist attack was carried out on a [Shia] mosque in the third security district of Herat city".
"Based on our initial information two terrorists were involved one of them wearing a suicide vest, who detonated himself while the second one was armed with a rifle. They are both dead," he added.
Afghan interior ministry spokesman Najib Danish initially said he thought it was a car bomb and tweeted that there was a possibility that it was an improvised explosive device.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ