Fourteen gunmen blasted their way into the British aid group's compound in the eastern city of Jalalabad, killing at least three people and wounding 27.

Save the Children and an AFP reporter at the scene said the attack was continuing in the early evening, hours after an official claimed it was over.

"Save the Children can confirm that the security incident affecting our office in Jalalabad, Afghanistan is still ongoing," a spokesperson said in a statement.

"In response to this all of our programmes across Afghanistan have been temporarily suspended and our offices are closed."

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. Our statement: https://t.co/juSPz9enud pic.twitter.com/yRlDe5crVc — Save the Children US (@SavetheChildren) January 24, 2018

After blowing up a car outside the British charity's compound in Jalalabad city, the attackers used a rocket-propelled grenade to storm the complex.

Security forces swarmed the compound after the attackers launched the morning raid and brought the assault to an end after more than three hours, Nangarhar governor spokesman Attaullah Khogyani told AFP.

"Our initial information shows the attackers had military uniforms on."

Getty Images

Mohammad Amin, who was inside the compound when the attackers launched the raid, 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," Mr 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.

Another witness told AFP: "It might be a complex attack. I am hearing gunfire from inside Save the Children compound."

Charities targeted

Wednesday's assault comes days after Taliban gunmen stormed a luxury hotel in the Afghan capital, killing 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.

But Taliban spokesman Zabiullah Mujahid said in a tweet Wednesday that the militant group was not responsible for the Jalalabad attack.

"We are devastated at the news that our Save the Children office in Jalalabad city, Afghanistan came under attack this morning," a Save the Children spokesperson said in a statement, withholding further details while the attack was ongoing.

The UN's mission in Afghanistan tweeted that it was looking into reports of the attack.

#Nangarhar – A car burns outside the Save The Children organization in #Jalalabad city after gunmen stormed the compound. pic.twitter.com/NFcDHHqzWn — TOLOnews (@TOLOnews) January 24, 2018

"Attacks directed at civilians or aid organisations are clear violations of international humanitarian law and may amount to war crimes," it said.

The assault on Save the Children, which has operated in Afghanistan since 1976, is the latest violence to strike a foreign aid group in the country.

The International Committee of the Red Cross announced in October it would "drastically" reduce its presence in the country after seven employees were killed in attacks last year.

The decision by the charity, which has been working in Afghanistan for over three decades, underlined the growing dangers for aid workers, who have increasingly become casualties of a surge in militant violence in recent years.

Nangarhar, a restive province bordering Pakistan, is a stronghold for the Islamic State group and also has a significant Taliban presence.

US and Afghan forces have been carrying out ground and air operations against IS fighters in Nangarhar.

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 another 13. There was no claim of responsibility.