The relative of an aid worker who was killed cries as others comfort him at a hospital in Mazar-e Sharif on Tuesday. (Anil Usyan/Reuters)

Gunmen stormed a compound housing a European-run aid group on Tuesday, killing at least nine people in one of the deadliest attacks on humanitarian workers in Afghanistan in recent years.

The victims, all Afghans employed by the Czech Republic-based People in Need, were sleeping when the attack occurred in the northern Balkh province shortly after midnight.

Officials said the assailants overpowered security guards and shot the victims multiple times. People in Need announced the suspension of its work in Afghanistan, saying it was reevaluating the security situation.

“We hereby express our deepest condolences to the families of our colleagues, respect to their work, and we condemn this attack, unprecedented in its brutality,” the group said in a statement, noting that it has been working in northern Afghanistan since 2002.

There was no claim of responsibility for the attack, but officials said they suspected it was carried out by militants affiliated with either the Taliban insurgency or the Islamic State extremist group.

Last month, Taliban militants killed 15 people, including 10 foreigners, after storming a hotel in Kabul. Many of those killed were aid workers.

Both the Taliban and the Islamic State have recently stepped up attacks in northern Afghanistan, which has been one of the most secure areas in the country.

Daud Naeem, a spokesman for the Afghan Ministry of Rural Rehabilitation and Development, said his agency had been helping People in Need coordinate projects in the region. The group provides humanitarian support during conflict or in the aftermath of natural disaster.

“This attack was the most brutal and deadliest of its kind in Balkh,” said Naeem, noting that one of the victims was a woman.

Balkh, on the border of Uzbekistan, is central to efforts by officials to bolster Afghanistan’s fledgling economy. The provincial capital, Mazar-e Sharif, houses numerous factories and is a major transit hub linking Afghanistan to trading partners in Central Asia.

Abdul Razaq Qaderi, Balkh’s police chief, said the attack occurred in the rural Zari district, on the outskirts of Mazar-e Sharif. Qaderi said that militant groups have not been known to operate in that district and that they may have traveled from neighboring Sar-e Pol province.

Over the weekend, Balkh’s influential acting governor, Atta Mohammad Noor, launched two development projects in Zari, according to local officials.

Bashir Ansari, a local journalist and political observer, said he suspects the militants are trying to “pass on a message” that they will try to undermine Noor by making the area “unstable.”

Afghan officials say an ongoing military offensive in Pakistan’s restive tribal areas has prompted scores of militants to flee across the border into northern Afghanistan. The Islamic State also is trying to gain a foothold in the region.

Even before Tuesday’s attack, humanitarian workers were increasingly being targeted in Afghanistan.

According to a study by Brown University’s Watson Institute for International Studies, 298 aid workers were killed in Afghanistan between 2001 and last summer.

Overall, the study estimates that 56,000 to 68,000 people, including civilians as well as Afghan and coalition troops, lost their lives in Afghanistan during that period.

When the death toll in neighboring Pakistan is included, the “Costs of War” study estimates that 100,000 to 150,000 people have been killed in the two countries since 2001.

Tim Craig in Islamabad, Pakistan, contributed to this report.

Read more:

Foreign fighters flee Pakistan offensive

Funerals become scenes of terror, bloodshed

Today’s coverage from Post correspondents around the world