ISIS has claimed responsibility for an attack Friday on a Shia Muslim mosque in the Afghan capital of Kabul which left 28 people dead.

The attack was carried out Friday afternoon, when one of three attackers blew himself up at the gate of the Imam Zaman Mosque, where Shia Muslim worshippers were attending Friday prayers.

The other two attackers stormed the mosque and fired on security forces.

Interior Ministry spokesman Najib Danish said authorities killed the gunmen after a nearly four-hour firefight.

At least 28 people, including two police officers, were killed and 50 others wounded, according to Afghan officials. Women and children were also killed during the attack.

In a statement posted by its Amaq News Agency, ISIS claimed responsibility for the attack, saying its suicide bombers attacked the mosque.

In recent months, ISIS militants have been repeatedly targeting Shia worshippers in Afghanistan and elsewhere.

Family members and relatives of the victims gathered Saturday to bury the bodies inside the mosque compound.

The terrorist group also claimed responsibility for a dual suicide blast at a mosque in the western city of Herat on August 1, when 30 people were killed as they gathered for evening prayers.