KABUL -- Militants stormed the offices of Save the Children in eastern Afghanistan on Wednesday, killing two security guards and a civilian, and triggering a shootout with police that was still underway more than eight hours later, provincial officials and the organization said.

The Islamic State group claimed responsibility for the attack, which took place in Jalalabad, the capital of Nangarhar province.

The assault started with a suicide bomber who detonated his explosives at the provincial offices of Save the Children, a non-governmental organization, said Attahullah Khogyani, spokesman for the provincial governor.

He said police killed two other attackers, and that at least 26 people, including six police officers, were wounded.

After eight hours the fighting subsided and Khogyani said he initially thought it was over but then the shooting picked up again. Save the Children confirmed the attack was still ongoing.

"Our primary concern is to secure the safety of all of our staff," it said, adding that it had temporarily suspended its work across Afghanistan.

IS said it was behind the attack. In a statement on its Aamaq media arm, the militant group said one of its suicide bombers with an explosive-laden vehicle and a subsequent raid targeted "British and Swedish foundations and Afghan government institutes."

Both the Taliban and IS are active in eastern Nangarhar province.

Zabihullah Zemarai, a member of the provincial council in Nangarhar, said police forces managed to rescue more than 40 people, mostly employees of the Save the Children group as the attack unfolded.

Monica Zanarelli, the International Committee of the Red Cross' head of delegation in Afghanistan, said that an attack against an organization that helps children is "outrageous."

"Civilians and aid workers must not be targeted," she said in a statement. "Increased violence has made operating in Afghanistan difficult for many organizations."

Amnesty International's chief for South Asia, Biraj Patnaik, expressed solidarity with Save the Children following the attack.

"It is an organization that has worked tirelessly in Afghanistan for more than four decades, delivering outstanding work during some of the country's most turbulent periods," Patnaik said. "Bombing and shooting people who are working for no other reason than to help improve the lives of young Afghans is a cowardly and despicable act."

The attack followed a deadly weekend siege of the Intercontinental Hotel in the capital Kabul in which 22 people were killed, including 14 foreigners. Multiple U.S. citizens were killed and injured in the Taliban's 13-hour siege of the hotel, the State Department said Tuesday. No exact figures were immediately available for either the U.S. fatalities or injuries.

Eleven of the 14 foreigners had been previously identified as working for the private Afghan airline KamAir. During a ceremony at Kabul's airport on Wednesday, the bodies of seven Ukrainian citizens were handed over to officials for transfer to Ukraine.

Mirwais Samadi, head of the consulate department at Afghanistan's Foreign Ministry, said the Kabul attack was launched by "terrorists" and their supporters.

"Some of our countrymen were martyred and some foreign nationals also were killed," he said. "We express our condolences and thoughts to the victims and families."

In eastern Ghazni province, meanwhile, four Afghan policemen were killed after their checkpoint came under attack by insurgents, said Arif Noori, spokesman for the provincial governor.

Six insurgents were killed and three were wounded in the battle, which took place early on Wednesday morning in Dayak district, said Noori.

Associated Press writer Amir Shah in Kabul, Afghanistan, contributed to this report