Kabul: Gunmen dressed as doctors stormed Afghanistan’s largest military hospital on Wednesday, officials said, in an attack claimed by the Daesh group as it makes inroads into the war-battered country.

The ongoing assault on the Sardar Daud Khan hospital left at least three people dead and 66 others wounded, with explosions and gunfire rattling Kabul’s diplomatic district as dense clouds of smoke rose in the sky.

Medical staff hunkered down in the hospital wards posted desperate messages for help on social media, with local television footage showing some of them trapped on the ledge of a top floor window.

“Attackers are inside the hospital. Pray for us,” a hospital staff member wrote on Facebook.

Hospital administrators said three gunmen wearing white laboratory coats were on the loose after a suicide bomber on foot blew himself up at the backdoor entrance, sparking chaos inside the 400-bed facility.

“I saw one of the attackers, armed with an AK-47 and dressed as doctor, shooting at patients and guards on the third floor,” hospital nurse Abdul Qadeer said.

“They shot my friend but I managed to flee ... I had to jump over the barbed wire to escape.”

At least two other loud explosions — including what the defence ministry called a car bomb in the hospital’s parking lot — were heard as Afghan special forces launched a clearance operation to rein in the attackers.

“Three attackers armed with AK-47s and grenades entered the building. Our commandos are chasing them,” ministry spokesman Dawlat Waziri said four hours after the first explosion.

“One of them has been killed, but two others are still resisting on the sixth and seventh floors of the building. We have evacuated all the patients.”

Afghanistan’s warring parties, including government forces, have repeatedly targeted medical facilities, decimating the country’s fragile health system and preventing conflict-displaced civilians from accessing life saving care.

“This is a criminal act. Nothing can justify an attack on hospitals,” Afghan Chief Executive Abdullah Abdullah said of the latest attack.

“We will never forgive these criminals. Unfortunately, this attack has resulted in some casualties.”

Daesh militants claimed the attack via a verified Telegram account.

The Taliban said they could neither confirm nor deny that they were behind the attack. The militant group, Afghanistan’s largest, is known to distance itself from attacks on medical facilities or those that result in high civilian casualties.

The assault comes just a week after 16 people were killed in simultaneous Taliban suicide assaults on two security compounds in Kabul.

Dozens of others were wounded as a suicide car bomber struck an Afghan police precinct in western Kabul and a five-hour gun battle ensued after another attacker snuck in.

In the second attack, a suicide bomber blew himself up at the gates of an Afghan intelligence agency branch in eastern Kabul.

The growing violence underscores rising insecurity in Afghanistan over the resurgent Taliban.

The country is bracing for an intense fighting season in the spring as the government’s repeated bids to launch peace negotiations with the Taliban have failed.

Afghan forces, already beset by record casualties, desertions and non-existent “ghost soldiers” on the payrolls, have been struggling to beat back the Taliban since US-led Nato troops ended their combat mission in December 2014.

Kabul last month endorsed US general John Nicholson’s call for thousands of additional coalition troops in Afghanistan to fend off the militants before the spring offensive.

Extra troops were needed to end the stalemate in the war, Nicholson, the top US commander in Afghanistan, told the US Congress in what could be President Donald Trump’s first major test of military strategy.