Media playback is unsupported on your device Media caption The attack sends a huge plume of black smoke into the sky

Attackers have detonated explosives before storming the offices of the Save the Children charity in the eastern Afghan city of Jalalabad.

At least two people have been killed and 12 injured, officials say. It is believed about 50 staff were in the building at the time.

The Islamic State group has said three of its fighters are behind the attack, which is said to have now ended.

Save the Children has temporarily suspended all of its Afghan programmes.

What's the latest?

The attack started at about 09:10 local time (04:40 GMT) on Wednesday when a suicide bomber detonated a vehicle explosive at the entrance to the Save the Children compound, Attaullah Khogyani, a spokesman for the governor of Nangarhar province, told the BBC.

An eyewitness who was inside the compound at the time told AFP news agency that he saw a gunman hitting the main gate with a rocket-propelled grenade (RPG).

Image copyright Reuters Image caption A suicide attacker detonated a car bomb at the entrance to the Save the Children compound

Image copyright Reuters Image caption Security forces dashed to seal off the area

Afghan commandos joined police to try to end the attack.

About 45 people were reported to have been rescued from the basement, as fighting continued on the upper floors.

Earlier, one WhatsApp message, reported by AFP to be from an employee, had read: "I can hear two attackers... They are looking for us. Pray for us... Inform the security forces."

There are several other aid agencies in the area, along with government offices.

Who is responsible?

The Islamic State group said in a message on its news outlet Amaq that three attackers and an explosives-laden car had targeted "British, Swedish and Afghan institutions in Jalalabad".

The city has been a stronghold for IS, whose fighters have been active there since 2015.

The Taliban had earlier denied carrying out the attack.

Their fighters had been behind the storming of a luxury hotel in Kabul at the weekend that killed at least 22 people, mostly foreigners.

Image copyright Reuters Image caption Residents flee the area amid the attack

What has Save the Children said?

A statement from Save the Children said the group was "devastated" at the news of the attack, confirmed the incident was ongoing and added: "Our primary concern is for the safety and security of our staff."

It continued: "All of our programmes across Afghanistan have been temporarily suspended and our offices are closed."

But it said it remained "committed to resuming our operations and lifesaving work as quickly as possible".

The UN's mission in Afghanistan said: "Attacks directed at civilians or aid organisations are clear violations of international humanitarian law and may amount to war crimes."

UK Secretary of State for International Development Penny Mordaunt condemned the attack in a departmental tweet.

What is Save the Children's Afghan work?

The charity has been working in Afghanistan since 1976. It currently runs programmes across 16 provinces in Afghanistan.

According to the aid agency, more than 700,000 children in Afghanistan have been reached over the years through its efforts.

The organisation says it aims to provide better access to education, healthcare and essential supplies to children across the globe.

Are charity groups targeted in Afghanistan?

They continue to work under tough conditions in the country, facing regular attacks and kidnappings.

The Red Cross announced in October that it was drastically reducing its presence in Afghanistan after seven of its staff were killed in attacks in 2017.

Attacks over the years include:

Additionally, the US bombing of a Médecins Sans Frontières hospital in Kunduz in October 2015 killed 22 people.