KABUL, Afghanistan (AP) — Gunmen wearing white lab coats stormed a military hospital in Afghanistan’s capital on Wednesday, killing at least 30 people and wounding dozens more in an attack claimed by the Islamic State group.

The attack on the 400-bed military hospital, which is located near two civilian hospitals in Kabul’s heavily-guarded diplomatic quarter, set off clashes with security forces that lasted several hours.

Gen. Dawlat Waziri, a Defense Ministry spokesman, says there were “more than 30 killed and more than 50 wounded” in the attack. He said Afghan forces had battled the attackers floor by floor. The ministry said the attackers were dressed like health workers.

Waziri said a suicide bomber had detonated his payload and another attacker was shot dead, and that one member of the security forces was killed and three wounded.

Afghan helicopters circled over the area, which was surrounded by security forces.

Abdul Qadir, a hospital worker who witnessed the attack, said an attacker in a white coat shot at him and his colleagues. Ghulam Azrat, another survivor, said he escaped through a fourth floor window after attackers killed two of his friends.

IS claimed the attack in a statement carried by its Aamaq news agency.

An affiliate of the extremist group has carried out a number of attacks in Afghanistan in recent years, and has clashed with the more powerful and well-established Taliban, who carried out a complex attack in Kabul last week.

Afghan security forces have struggled to combat both groups since the U.S. and NATO formally concluded their combat mission at the end of 2014, switching to an advisory and counterterrorism role.

Afghan President Ashraf Ghani condemned the attack during an address in honor of International Women’s Day, calling it “an attack on all Afghan people and all Afghan women.”