He claimed to have acted in retaliation for comments made in early June by a spokeswoman for Indian Prime Minister Narendra Modi’s party about the Prophet Muhammad that IS deemed “insulting”.

Protests erupted in several countries across the Muslim world following these remarks about the relationship between the Prophet and his youngest wife, Aisha.

In a message published via its propaganda organ Amaq, IS claimed that the attack was aimed at Hindus, Sikhs and the “apostates” who protect them.

IS said one of its fighters “entered a temple for Hindu and Sikh polytheists in Kabul, after killing its guardian, and opened fire on the pagans inside with his machine gun and grenades”. .

Two people were killed and at least seven others injured during the attack on this temple located in the west of the capital.

Interior ministry spokesman Abdul Nafi Takor said armed men entered by attacking “a guard with grenades”, which caused a fire.

This attack comes a few days after the visit of an Indian delegation to Kabul, to discuss with the Taliban government about the humanitarian aid brought by Delhi to Afghanistan.

The possibility of reopening the Indian embassy in the Afghan capital has also been raised.

New Delhi, which had close ties with the previous US-backed Afghan government, closed its mission in Kabul when the Taliban seized power on August 15.

About 200 Sikhs live in Afghanistan – an almost entirely Muslim country – compared to around half a million in the 1970s.

In recent years, the Afghan Sikh community has been the target of several attacks.

IS had already targeted this minority in a suicide attack in July 2018 in Jalalabad, in the east of the country, killing 19 people.

Forty years of war, poverty and discrimination have caused the exodus of the Afghan Sikh community.

After the fundamentalists came to power in August, many took refuge in the building attacked on Saturday.

The number of attacks, often targeting minority religious communities, has decreased in the country since the arrival of the Taliban.

However, a series of bomb attacks, in which dozens of people were killed, hit the country at the end of April, during the month of Ramadan, and then at the end of May.

Most have been claimed by IS.