Taliban suicide bombers and gunmen dressed as Afghan police attacked a US base near the Pakistani border on Monday, sparking a shootout that left all three assailants dead, officials said.
No member of the US-led NATO mission in Afghanistan was killed in the assault on the base in Nangarhar province, said a spokesman for the International Security Assistance Force (ISAF).
"There were a series of explosions that occurred in the vicinity of a forward operating base in Nangarhar province," an ISAF spokesman told AFP.
The military later described it as an "attempted but unsuccessful coordinated attack by enemy forces".
"There were three enemy forces killed during the attack. We can confirm that no ISAF personnel were killed as a result of this incident," it said in a statement.
An AFP photographer saw the bodies of three dead attackers wearing Afghan police uniforms.
NATO combat troops are gradually withdrawing from Afghanistan and are due to finish their mission completely by the end of 2014, after presidential elections next April.
Afghan officials said Monday's attack took place at Torkham, which borders Pakistan and straddles a key NATO overland supply route into landlocked Afghanistan from the nearest sea port of Karachi.
Ahmad Zia Abdulzai, Nangarhar governor's spokesman, said insurgents first attacked NATO supply trucks.
"Today morning, Taliban insurgents attacked and burned supply trucks delivering supplies to NATO which belonged to foreign forces near the US base in Torkham," he told AFP.
"Later, three armed suicide bombers started gunfire and clashes with Afghan forces and US forces, and they were killed after three hours of fighting.
"At the moment, the stand-off is over, and the situation is under control."
Zabihullah Mujahid, a spokesman for the Taliban which is leading a 12-year insurgency against Western troops and the Afghan government, claimed responsibility for the attack in a statement sent to the media.
The Taliban have launched a spate of attacks across the country in recent days, with scores killed in suicide bombings, ambushes and rocket attacks. They also killed five aid workers in the west.
On Sunday the bullet-riddled bodies of seven civilians kidnapped one week earlier by the Taliban were found in Ghazni province just south of the capital.
Also on Sunday Afghanistan's ambassador to Pakistan and potential candidate for next year's presidential election, Omar Daudzai, was appointed acting interior minister.
President Hamid Karzai, who has led Afghanistan since the 2001 US-led invasion removed the Taliban from power, is barred from standing for a third term.
He has said he will not back anyone in the April 5 vote, but Daudzai is seen as one of his closest associates and loyalists.
Daudzai, 55, from the biggest ethnic group the Pashtuns, was a member of the Hezb-e-Islami faction during the Soviet occupation and later went on to work for the United Nations.
Interior minister Mujtaba Patang was voted out by parliament in July over accusations that he had failed to thwart the threat from Taliban rebels.
Afghanistan's 350,000-strong security forces are suffering a steep rise in attacks as the NATO mission winds down, with police and army casualties said to have increased by 15-20 percent since 2011.
The election to succeed Karzai is seen as the key test of whether 12 years of massive international military and aid intervention has been worthwhile.
Karzai recently named controversial former warlord Abdul Rab Rasul Sayyaf, 2009 runner-up Abdullah Abdullah and former finance minister Ashraf Ghani as possible candidates.
Other possibilities include Qayum Karzai, the president's brother, and former interior minister Ali Ahmad Jalali.
Karzai has pledged to ensure a smooth election, but international donors have expressed concern about whether the vote will produce a credible result after the 2009 poll was marred by massive fraud.