A group of would-be suicide bombers tried to storm a major Nato base in eastern Afghanistan but were repelled before they could enter, officials said.
The Taliban claimed responsibility for the attack – their second assault on the Nato base and an adjoining airport outside Jalalabad city in six months.
Meanwhile, a bomb attack in the north of the country killed seven people.
The militants attacked the Afghan army checkpoint outside the Jalalabad base shortly after dawn, sparking a gunbattle that lasted at least two hours and involved Nato helicopters firing from overhead, said Sgt Abdullah Hamdard, a national army commander at the site.
A spokesman for the Nangarhar provincial government, Ahmad Zia Abdulzai, confirmed the attack and said eight assailants were killed – including two who were wearing explosive vests.
Taliban spokesman Zabiullah Mujahid said there were 14 attackers and that 11 of them were killed, though the insurgent group typically gives inflated numbers.
Nato forces said in a statement that the base received fire but initial reports indicated no foreign or Afghan forces were killed. Mr Abdulzai said the area was secure by late morning and that they had killed all the attackers.
In June, militants assaulted the Nato base with a car bomb, rocket-propelled grenades and automatic weapons but did not breach its defences. Eight militants were killed in that attack.
In northern Kunduz province a bomb hidden in a motorbike exploded on a busy street in Imam Sahib district, killing seven people.
The bomb was detonated just as a vehicle belonging to a police official drove past. The official – Commander Mohammad Manan – was killed, along with one of his bodyguards and five civilians, said Abdul Qayum Ebrahimi, the district police chief.