(CNN) An Islamic State affiliate has claimed responsibility for an attack on a Sikh temple in Afghanistan's capital Kabul that killed at least two people and injured seven.
The attack on Saturday was "an act of revenge" following insults made by members of India's ruling Bharatiya Janata Party about the Prophet Mohammed, ISIS-Khorasan said on its Telegram channel.
Nupur Sharma, a spokesperson for the party, had made derogatory remarks regarding the Prophet Mohammed during a panel discussion on a news channel and her comments were allegedly followed by anti-Islam comments by another party leader on Twitter.
Seven gunmen had tried to storm the temple in the early hours of Saturday morning and all were killed after a standoff that lasted several hours, according to Kabul police.
ISIS-K said in its Telegram post that its suicide bomber Abu Muhammad al-Tajik had gained entry to the temple by throwing a hand grenade at the security guard officer at the entrance, killing him.
"Armed with a rifle, pistol and hand grenades, he proceeded to shoot," the worshippers inside the temple, ISIS-K said.
A temple official said 30 people were inside the temple at the time.
ISIS-K also claimed its members had clashed with Taliban government fighters trying to reach the temple, targeting them with a car bomb and four other explosive devices.
It said the clashes between ISIS-K and the Taliban fighters had lasted three hours and that the suicide bomber al-Tajik had died in these exchanges.
"The IEA [Islamic Emirate of Afghanistan] strongly condemns the targeting of the Hindu shrine in Kabul by the enemies of the Afghan people. The IEA expresses its condolences to the families of the victims and assures that serious measures will be taken to identify and punish the perpetrators of this crime," Taliban spokesman Zabihullah Mujahid, tweeted referring to the Sikh temple.
Afghanistan, once home to tens of thousands of Sikhs and Hindus, has seen numerous attacks on religious minority groups since the Taliban took control of the country in 2021, following the withdrawal of US forces.
Last year, ISIS claimed another attack against the Sikh community that killed more than two dozen people at another temple in Kabul.
Saturday's attack comes amid growing outrage in the Muslim world towards India for the comments by the BJP members and New Delhi is struggling to contain the diplomatic fallout from Muslim-majority nations like the United Arab Emirates, Malaysia, Oman and Iraq.
The UN Assistance Mission in Afghanistan (UNAMA) condemned the most recent attack, calling on Twitter for the "protection of all minorities in Afghanistan, including Sikhs, Hazaras and Sufis."
The European Union Ambassador to Afghanistan also condemned the attack, saying "religious (and ethnic) pluralism needs to be protected with full force."
India's Foreign Ministry said it was "deeply concerned at the reports emanating from Kabul about an attack on a sacred Gurdwara in that city."