Updated

Three people including a German security guard were killed Friday in an attack -- reportedly by the Taliban -- on the office of a U.S. aid contractor in northern Afghanistan, the provincial governor said.

Homicide attackers and gunmen stormed the offices of Development Alternatives Inc. (DAI) early Friday morning, said the governor of northern Kunduz province, Mohammad Omar.

"The first suicide attacker detonated at the entrance (of the DAI compound), the second detonated inside the premises, killing one foreign national," he said.

Two homicide attackers were killed by security forces before they were able to detonate their explosive-packed vests, he said, adding that two militants were "still resisting" from inside the compound.

A security guard and a policeman were also killed, Omar said.

A U.S. embassy official confirmed the foreign national killed was a German security guard.

The official, who spoke on condition of anonymity, said another foreign citizen whose identity was unclear was shot in the arm during the siege.

"Afghan troops are working to clear the building and medevac the injured," the official said.

At least three people were killed in the attack on the five-story building, which began at around 3:45am local time, officials said.

Most expatriates at the compound fled to the roof as a gun battle raged, said an official.

"One expat was shot in the arm on the roof," he said, adding that he was unsure if the foreigners were targeted as they took refuge or if the shooting was the result of a stray bullet.

Police said they believe that some guards on the gate were possibly killed as the militants entered the compound.

"The initial information we have is that 20 locals and policemen are wounded," said Omar.

DAI is a so-called implementing partner of Washington's international aid arm, USAID.

Such contractors play an increasingly important role in Afghanistan, utilizing billions of dollars in aid money pouring into the impoverished country in an effort to rebuild after 30 years of war.

As the current war dragged into its ninth year, the Taliban began stepping up attacks on foreign targets in reaction to intensified efforts by the U.S. and NATO to rout the militants.

U.S. aid contractors were attacked in a number of locations in Afghanistan in recent months -- notably in the southern provinces of Helmand and Kandahar, where the fighting is fiercest.

The U.S. and NATO have 140,000 troops in Afghanistan, with most of the newly-deployed heading to the south as part of a U.S.-led counterinsurgency strategy aimed at speeding the end of the war.

The Taliban recently vowed more attacks on foreign troops, companies and personnel in Afghanistan in reaction to the increased presence and intensified operations of the U.S.-led coalition.

Homicide and gun attacks on foreign firms -- most involved in delivering aid projects -- have shaken the companies and impacted their efforts to recruit foreign staff as part of the so-called civilian surge to speed development.