Gunmen and suicide bombers raided a Sikh religious complex in the Afghan capital of Kabul on Wednesday, killing 25 people before security forces killed all of the attackers, the government said.
The Islamic State militant group claimed responsibility for the attack in a statement. Sikhs have been the target of attack by Islamist militants before in South Asia. Their community in Afghanistan numbers fewer than 300 families.
Several hours after the early morning attack was launched, Interior Ministry spokesperson Tariq Arian said an operation by the security forces was over and all of the attackers had been killed. He did not say how many.
The ministry said 25 people who had been in the religious compound had been killed, eight wounded and 80 rescued.
Narender Singh Khalsa, a member of parliament who represents the tiny Sikh community, said he had had reports that up to 200 people had been trapped in the temple during the attack.
"Three suicide bombers entered a dharamsala," he said, referring to a sanctuary area in a temple compound. "The gunmen started their attack at a time when the dharamsala was full of worshippers."
Outside, families gathered and women cried as they waited to find out the fate of their relatives.
In the late 1980s, there were about 500,000 Sikhs scattered across Afghanistan, many from families that had been there for generations, but most fled after years of civil war and the rise of the Taliban.
A Taliban spokesperson, in a message on Twitter, denied responsibility for the attack.
Human rights activists and countries including the United States, India and Pakistan condemned the attack.
"We are shocked and disheartened ... the authorities have a responsibility to protect minorities and their places of worship in Afghanistan," Amnesty International South Asia said on Twitter.
In 2018, a suicide bombing targeting the Sikh community and claimed by Islamic State killed more than a dozen people in the eastern Afghan city of Jalalabad.
The United States last month struck a deal with the Taliban on the withdrawal of US-led international troops but the agreement does not include Islamic State militants.
The attack comes a day after the United States said it would cut aid to the government by $1 billion (RM4.43 billion) over frustrations that feuding political leaders could not reach agreement and form a team to negotiate with the Taliban.
An official with Afghanistan's NATO mission said the response to the attack had been led and executed by Afghan forces but they had received some advice and assistance from NATO.