The toll could have been much higher in the course of the nine-hour gun battle between the militants and soldiers, but it appears that staff of the Save the Children charity were able to hide in a "safe room" and remain undiscovered.
The attack was claimed by the local affiliate of the Islamic State and began with a car bomb detonated outside Save the Children's building. At least three gunmen then stormed the premises, sparking a battle that lasted until nightfall. Two of the dead were guards for the charity, which is located on a street near several other aid groups.
It was after the battle, as the soldiers searched the offices, that they discovered some 40 people, including women, hiding in the safe room.
Taliban insurgents, who claimed responsibility for the weekend strike against the Intercontinental Hotel, disavowed any connection with the Jalalabad attack.
The latest attacks appear likely to further stoke anxieties among foreigners and aid groups in Afghanistan. Some foreign charities have already reduced their activities over the past year because of rising violence as Afghan forces, aided by the United States and NATO, battle a resurgent Taliban and affiliates of the Islamic State.
Save the Children, which has operated in Afghanistan for decades, said it was shutting down its operations — including education and relief programs for 1.4 million children in the country — and would resume them only after security assurances.
"In response to this all of our programs across Afghanistan have been temporarily suspended and our offices are closed. Afghanistan is one of the most difficult places in the world to be a child and for humanitarians to operate in," it said in a statement.
Images on social media and local TV news channels showed flames and smoke rising from the charity's building in Jalalabad, while a group of panicked children ran for cover on the street outside.
In a statement emailed to journalists, the United Nations mission in Afghanistan condemned the assault, saying that "attacks directed at civilians or aid organizations are clear violations of international humanitarian law and may amount to war crimes."
The attack came just four days after Taliban militants stormed the hilltop Intercontinental hotel in Kabul. Among the 22 dead were 14 foreigners, including three Americans. It was one of the bloodiest attacks against foreigners since the Taliban was driven from power in 2001, and Taliban officials said they were specifically targeting expatriates visiting the hotel.
The attack, which lasted nearly 16 hours, raised questions about how five assailants managed to enter the guarded premises with guns and explosives and roam the floors for hours before being killed by Afghan security forces. Afghan officials said the attack was conducted by the Pakistan-based Haqqani network, a Taliban faction.
Sharif Walid in Kabul contributed to this report