Save the Children suspended operations across Afghanistan on Wednesday as Islamic State militants terrorised staff trapped inside one of its offices in a deadly hours-long attack, the latest assault on a foreign charity.
Gunmen blasted their way into the British aid group`s compound in the eastern city of Jalalabad, killing three employees and wounding four others, Save the Children said in a statement.
An Afghan official had earlier confirmed the death toll but put the number of wounded at 27.
"It is with profound sadness that we can confirm three Save the Children staff members were killed earlier today in an attack on our office in Jalalabad, Afghanistan. All other staff have been safely rescued from the office," Save the Children International chief executive Helle Thorning-Schmidt said, condemning the attack "in the strongest possible terms".
"We have temporarily suspended our operations across the country following today`s events, however we remain fully committed to helping the most deprived children of Afghanistan."
After blowing up a car outside the charity`s compound in Jalalabad, the attackers used a rocket-propelled grenade to storm the complex, in a raid claimed by IS via its propaganda arm Amaq.
Attaullah Khogyani, a spokesman for the Nangarhar provincial governor, said at least three people -- two guards and a civilian -- had been killed and 27 wounded in the attack involving six assailants.
Up to 50 people including women were rescued from a basement where they had been hiding from attackers, Khogyani said in a statement.
During the ordeal one of the employees hiding in the safe room sent a WhatsApp message to a friend begging him to "pray for us".
"I can hear two attackers on the second floor. They are looking for us. Inform the security forces," he wrote in the message seen by AFP.
UK ambassador to Afghanistan Nicholas Kay condemned the attack in a tweet.
"This is an outrage. Any attack on children & humanitarians is a crime against humanity," Kay said.
The European Union said the assault was a "grave violation of international humanitarian law".
Mohammad Amin, who was inside the compound when the attackers launched the raid at 9:10 am (0440 GMT), told AFP from his hospital bed that he heard "a big blast".
"We ran for cover and I saw a gunman hitting the main gate with an RPG (rocket-propelled grenade) to enter the compound. I jumped out of the window," Amin said.
Afghan TV news channels showed a thick plume of black smoke rising above the compound and what appeared to be at least one vehicle on fire outside the office.
IS has intensified attacks in cities in recent months, targeting mosques and Afghan security forces as it expands beyond its stronghold in the east.
Militant groups rarely claim responsibility for attacks on aid workers. Wednesday`s assault comes days after Taliban gunmen stormed a luxury hotel in the Afghan capital and killed at least 22 people, mostly foreigners.
Insurgents armed with Kalashnikovs and suicide vests attacked the landmark Intercontinental Hotel, going from room to room searching for foreigners during the more than 12-hour ordeal.
"Attacks directed at civilians or aid organisations are clear violations of international humanitarian law and may amount to war crimes," the UN`s mission in Afghanistan tweeted earlier.
The assault on Save the Children, which has operated in Afghanistan since 1976, is the latest violence to hit a foreign aid group in the country.
Afghanistan recorded the second highest number of attacks against aid workers worldwide in 2016, according to UK-based research group Humanitarian Outcomes. Only South Sudan was more dangerous.
The International Committee of the Red Cross announced in October it would "drastically" reduce its presence in Afghanistan after seven employees were killed in attacks last year.
Nangarhar, a restive province bordering Pakistan, is a stronghold for IS and also has a significant Taliban presence.
US and Afghan forces have been carrying out ground and air operations against IS fighters in the province.
While Afghan security forces are conducting most of the fighting against IS and Taliban militants, US troops operate alongside them in a training capacity and are frequently on the front lines.
The last major attack in Jalalabad was on December 31 when an explosion at a funeral killed 18 mourners and wounded 13. There was no claim of responsibility.