Gunmen and suicide bombers have killed at least 25 worshippers, including women and children, and injured many others in an early morning attack on a Sikh Gurdwara in the heart of Kabul.

The attack lasted hours as the gunmen held hostages on Wednesday while Afghan special forces and international troops tried to end the siege in a complex that is home to many families, as well as a place of worship.

Narender Singh Khalsa, a member of parliament who represents the Sikh community, told Reuters that there were three attackers, who arrived when the buildings were full of worshippers. Islamic State, which has targeted Sikhs in Afghanistan before, said it carried out the attack.

Up to 200 people were trapped inside the temple when the attack began at about 7am, interrupting worship that had started an hour earlier. The attackers reportedly threw grenades, and after bursting into the complex, started shooting indiscriminately.

“The attackers arrived on the stairs and started killing the women. My nephew shouted and said to me ‘Uncle, please go downstairs’, and when I tried to go downstairs, they shot my nephew in the head,” said Harander Singh, who lost several other relatives including his wife, father and daughter.

“My dearest daughter was wounded, and she was repeatedly calling me ‘Dad’ before she died,” he told Reuters, through tears.

The attack was condemned internationally and across much of Afghan society.

“My colleague Meharwan Singh lost his uncle and 20 friends, including two children and four women, in this appalling terrorist crime today,” said Nader Nadery, a top civil servant and presidential adviser, on Twitter. “I share his pain and outrage.”

Afghanistan’s tiny Sikh community is one of few religious minorities in the country, protected by law but frequently targeted by extremists and subject to discrimination.

Thirty years ago it was 500,000 strong, but after decades of conflict and the rise of the Taliban – who ordered Sikhs to wear yellow armbands – many have sought asylum in India and the community is thought to have been reduced to about 300 families.

In 2018 a convoy of Sikhs and Hindus travelling to meet the president, Ashraf Ghani, was targeted by an Islamic suicide bomber. The massacre on Wednesday was the second Isis attack on a religious minority in March; a gathering of the predominantly Shia Hazara ethnic minority was also attacked earlier this month, with more than 30 people killed.

As news of the latest attack broke, a spokesman for the Taliban, which recently signed a withdrawal deal with the US government and is moving towards intra-Afghan talks, was quick to deny any responsibility in the killings.

Afghan officials and Taliban leaders met for several hours of talks on Wednesday and are expected to start a prisoner release programme next week. The prisoner releases were a precondition for starting intra-Afghan peace talks, which are meant to follow a US withdrawal deal.

But they have been delayed because the results of presidential elections last year are still contested, the two main candidates have held parallel inaugurations, and Ghani, the incumbent, said the promise of prisoner releases was made unilaterally by the US negotiators.

The US, after failing to broker a compromise between Ghani and Abdullah Abdullah, threatened to cut aid to the government by $1bn if they did not reach agreement.

Adding to the country’s troubles, there are fears that a coronavirus outbreak could be gathering force, as tens of thousands of Afghans have returned from badly hit Iran this year without any quarantine or testing. There are fears it could overwhelm the country’s health system, and the UN has called for a ceasefire to help prepare for the looming crisis.