Attack occurred as worshippers gathered for a night of religious observances as part of the holy month of Ramadan.

An attack at a Shia mosque in the Afghan capital of Kabul killed at least four people and wounded eight more on Thursday, security officials said.

Two suspected attackers tried to enter the city’s Al Zahra mosque but were blocked by police, setting off a gun battle, Najib Danish, Interior Ministry spokesman, said.

The attackers then took refuge in the mosque’s kitchen before detonating a bomb.

The Islamic State of Iraq and the Levant (ISIL, also known as ISIS) claimed responsibility for the deadly attack via its news agency Amaq.

Among the dead were at least three civilians and one police officer, while four civilians and four police officers were wounded.

The attack happened as mosques around the city were crowded for a night of religious observances as part of the Islamic holy month of Ramadan.

Abdullah Abdullah, Afghanistan‘s chief executive, condemned the blast on Twitter.

Attack on praying Muslims inside a mosque in the holy month of Ramadan is against faiths, religions and beliefs. I condemn this enemy act! — Dr. Abdullah Abdullah (@DrabdullahCE) June 15, 2017

Among those killed was also Haji Ramazan, a well-known businessman who built the Al Zahra mosque

The attack comes at a time when Kabul is already on edge, following a wave of deadly bombings, which triggered angry public protests calling for the resignation of President Ashraf Ghani‘s government over spiralling insecurity.

Health ministry officials said Kabul ambulances carried the dead and wounded victims to the hospital.

The Al Zahra mosque, located in west Kabul, is used by the Shia minority, who have been targeted by suicide bombings in the past.

An attack on a Shia mosque in November killed more than 30 people.