KABUL (Reuters) - Islamic State on Wednesday claimed responsibility for a mass shooting that killed at least 18 worshippers at a shrine in the Afghan capital, raising fears of sectarian violence after a string of attacks on the country’s Shi’ite minority.

The claim to Tuesday’s attack, released online, came as the community observed Ashura, one of its holiest days, although commemorations have been subdued because of security fears.

On Wednesday afternoon, an explosion outside a mosque in northern Afghanistan killed at least 14 people and wounded 24 at a similar gathering. There was no immediate claim of responsibility for that assault.

Islamic State had earlier targeted members of Kabul’s Shi’ite community in a suicide bombing in July that killed more than 80 people and wounded 130.

The attacker in Kabul, said to be wearing a police uniform, entered the Karte Shakhi mosque on Tuesday night and opened fire on a crowd of Shi’ite Muslims marking Ashura, which commemorates the seventh-century death of a grandson of the prophet Mohammad.

In its statement, Islamic State said the attacker detonated a suicide vest after firing all his ammunition, but security forces said they shot the man.

A Reuters video shows the suspected attacker’s body intact, with no sign of an explosive vest.

Slideshow ( 12 images )

Relatives carried dead and wounded victims away from the blood-stained steps of the mosque, which is known for its bright blue tiles and domes.

The dead included four women and two children, said the United Nations, which condemned the attack as a violation of international law.

“This attack, deliberately targeting a large group of civilians exercising their right to freely manifest their religion in worship, observance and practice, is an atrocity,” the U.N. said in a statement.

It put the tally at 18 civilians killed and 50 wounded, though some witnesses said the toll could be higher.

Mourners buried several of the victims, including a four-year-old girl, on Wednesday.

“We are not happy with the government and the police. They both failed to protect us and provide security for us,” said one of the girl’s relatives, Mohammed Hussain, who described the event as “doomsday” for the family.

Ashura is typically marked by processions that include self-flagellation by some worshippers, but government warnings of possible attacks prompted more subdued events this year.

The Taliban, who have been waging a 15-year insurgency against the Western-backed government and often conduct attacks in Kabul, denied involvement in the shooting.

The schism between Sunnis and Shi’ites developed after the Prophet Mohammad died in 632 and his followers could not agree on a successor. Some Sunni Muslim militants see Shi’ites as a threat and legitimate targets for attack.