Updated

Taliban fighters wearing suicide bomb vests hidden under police uniforms attacked a government building Sunday in eastern Afghanistan, triggering an hours-long gunbattle and killing six people, officials said.

Taliban spokesman Zabiullah Mujahid claimed responsibility for the attack in Khost province in a text message to The Associated Press. The attack came a day after a Taliban suicide bomber slipped inside the capital's main military hospital and killed at least six Afghan medical students — worrying reminders of militants' ability to infiltrate locations thought to be secure.

In Sunday's attack, four men armed with assault rifles and wearing explosives drove shortly before dawn into a compound that houses the provincial traffic department on the edge of Khost city, provincial Police Chief Gen. Abdul Hakim Ishaqzai said. Security forces stopped the men, who were wearing uniforms of the Afghan border police, only after becoming suspicious of the civilian station wagon they drove, he said.

Guards opened fire on the attackers, but the men were able to occupy the upper floor of the building, Ishaqzai said. The attackers shot at Afghan security forces from their vantage point as a fire raged through the structure. AP Television News video showed U.S. soldiers surrounding an outer wall and shouting orders as Afghan troops rushed toward the building, which was engulfed in smoke.

Two of the attackers detonated their bomb vests during the fighting, with one bomber killing two Afghan soldiers, said Gen. Raz Mohammad Oryakhail, the army commander for Khost province. Security forces shot and killed the other two attackers.

Three police officers and a gardener working at the site were also killed, Ishaqzai said. Five police officers, one soldier and one civilian were wounded.

Soldiers defused more explosives found inside the attackers' station wagon.

The police chief said the Taliban attackers could have been stopped before taking the building had a guard's assault rifle not jammed. The U.S. provided Afghan police with some of the Hungarian-made AMD-65 rifles, which have been criticized for their poor performance.

Meanwhile, U.S. forces in southern Afghanistan shot a governor's spokesman in the foot Sunday as he arrived at work.

Spokesman Zalmai Ayubi said U.S. forces shot him as he arrived at the gate of the Kandahar governor's office for no reason. Ayubi leaned on a cane as he spoke with reporters, his left foot bandaged.

In a statement to the AP, NATO forces confirmed the shooting, saying Ayubi had struggled with a guard as he "attempted to physically bypass security" at the office.

"In the ensuing altercation, the U.S. soldier's rifle was discharged, hitting the spokesman in the foot," NATO said.

Elsewhere in the east, a NATO service member was killed Sunday in a bomb attack, the alliance said. NATO did not provide details or the service member's nationality.

A roadside bomb exploded Sunday in the southern province of Zabul, killing two people and wounding five others, the Afghan Interior Ministry said. Another roadside bomb exploded overnight in Kandahar city, killing one police officer and wounding three others, police said.

Taliban fighters remain able to get into fortified areas despite an expansion of checkpoints and security cordons by Afghan and NATO forces. It is not hard for them to get hold of security agency uniforms to use as disguises; they are available at shops across the country.

President Hamid Karzai's office said security agencies had "arrested a number of people" on suspicion of taking part in Saturday's hospital bombing in Kabul. It gave no details.

The effectiveness of the Taliban's campaign will in part determine the size of President Barack Obama's planned drawdown of American troops in July.

NATO has committed itself to handing over control of security to Afghans by 2014.

Also Sunday, the Afghan government submitted its proposal for a strategic partnership agreement to U.S. officials, the president's office said. The compact, which has been in negotiations for months, aims to create a formal framework for the massive U.S. presence in the country. There currently is no bilateral agreement governing the U.S. military and civilian campaigns in Afghanistan.

Karzai has previously pledged to put strict conditions on the U.S. going forward, including rules for the conduct of soldiers, minimum funding levels and development priorities.

Waheed Omar, a spokesman for Karzai, declined to provide specifics on the draft.

"Our position is that whatever comes out of this strategic partnership agreement, it has to be binding," Omar said.

The U.S. Embassy received the draft and was reviewing it, said Kerri Hannan, a spokeswoman for the embassy. She declined to comment further.

___

Associated Press writers Heidi Vogt in Kabul and Mirwais Khan in Kandahar contributed to this report.

___

Jon Gambrell can be reached at www.twitter.com/jongambrellAP.