A suicide attack near a Shia mosque in the Western Afghan city of Herat killed at least one person and wounded eight others, police and health officials said on Sunday.
Militant group Islamic State claimed responsibility for the attack, which followed another blast that was claimed by the group in Kabul last week and killed about 30 people near a Shi'ite shrine as the city celebrated Nawruz, the Persian new year.
Deputy police chief Aminullah Amin said that two bombers had tried to enter the mosque but were challenged by security guards who opened fire on them.
"Our Shia brothers were praying in the mosque when two suicide bombers entered the mosque compound. Fortunately, the bombers were identified by Afghan police and local residents," he said.
Amin said that one of the bombers was shot by security guards while the second detonated his explosives.
Health officials said one person was confirmed dead, with eight wounded, but the final figures could change.
Herat, one of the most prosperous cities in Afghanistan, has experienced periodic episodes of violence but has not suffered the same level of attacks as the capital Kabul.
While sectarian violence in Afghanistan was previously rare, a series of attacks over recent years, many claimed by Islamic State, have killed hundreds of Shias, many from the Hazara ethnic minority.
The local affiliate of Islamic State first appeared in Afghanistan three years ago. As well as its main stronghold in the eastern region of Nangarhar, on the border with Pakistan, fighters declaring allegiance to the group have been active in northern Afghanistan.
The group has also claimed numerous attacks in Kabul and other cities, though many experts doubt whether it has the capacity to conduct such attacks alone and believe it may have received help at times from other militant groups.
The violence has occurred alongside a general deterioration in security in Afghanistan as Taliban insurgents have fought government forces across much of the country, killing thousands of civilians every year.