Suspected Taliban militants have attacked one of the largest and most-heavily fortified US bases in Afghanistan.
Ten insurgents were killed and seven US troops injured in the battle at Bagram air base that raged for several hours, a US official said.
The Taliban used machine guns and grenades in the pre-dawn attack.
It comes a day after a suicide bomb attack in Kabul on a Nato convoy killed 18 people, including five US soldiers.
It was the deadliest Taliban attack this year on foreign troops in the Afghan capital.
The Taliban insurgents launched their attack against the Bagram base at about 0300 local time, using machine guns and a rocket-propelled grenade launcher.
An Afghan police chief, Gen Abdul Rahman Sayedkhail, told the Associated Press that the insurgents approached the base in a car. US soldiers opened fire, triggering a running gun battle.
"Our folks, always being ready to respond to these kind of attacks, did respond immediately," Sgt Tom Clementson who is at the base told the BBC.
The fierce exchange of gunfire subsided around noon.
The BBC's Mark Dummett in Kabul says the Afghan police are now out in force surrounding the base. They are its first line of defence and are leading the search for any remaining Taliban.
Sgt Clementson described the incident as a "failed attack".
Nato said 10 insurgents were killed during the operation. Afghan police at the scene said there were only five insurgents who were all killed. A Taliban spokesman said 20 insurgents were involved in the assault.
The air base is situated 30 miles (50km) north of the Afghan capital. Two US troops were killed in a similar attack in June 2009.
The BBC's Ian Pannell in Kabul says the timing suggests this latest attack is part of the insurgents' spring offensive against foreign troops and the Afghan government, codenamed Operation al-Fath (Conquest).
Despite all the talk of reconciliation, almost everyone expects more fighting and more deaths in the months ahead, our correspondent says.