The Islamic State group says it was behind a mosque attack in Afghanistan that killed 6 people

This is a locator map for Afghanistan with its capital, Kabul. (AP Photo)

ISLAMABAD (AP) — The Islamic State group has claimed responsibility for a deadly shooting this week targeting members of the country’s minority Shiite community inside a mosque in western Afghanistan that killed six people.

The militant group said in a statement posted on its Telegram website late on Tuesday that one of its members attacked a “Shiite temple” in Herat province with machine-gun fire. The attack, which took place on Monday night in the district of Guzara, also left one person wounded.

The attacker fled the scene. The Taliban Interior Ministry has said that an investigation is underway.

Local media reported that the mosque’s imam was among those killed. The U.N. mission in Afghanistan condemned the attack, saying a child was among the victims. It called for urgent accountability for perpetrators and protection measures for Shiite communities.

Afghanistan's former President Hamid Karzai said on the social media platform X that he considered“this terrorist act against all religious and human standards.”

Pakistan's foreign affairs ministry said Wednesday that “the people and government of Pakistan extend their heartfelt condolences to the people of Afghanistan.”

"Our thoughts and prayers are with the victims and their families in this hour of grief,” it said.

The statement added that Pakistan condemns terrorism in all its forms.

The IS affiliate in Afghanistan is a major Taliban rival and frequently targets schools, hospitals, mosques and Shiite areas throughout the country.

The Taliban seized power in Afghanistan in August 2021, during the last weeks of the chaotic departure of U.S. and NATO troops from the country after 20 years of war.

Despite initial promises of a more moderate stance, the Taliban gradually reimposed a harsh interpretation of Islamic law, or Shariah, as they did during their previous rule of Afghanistan from 1996 to 2001.