Militants fired machine guns, rocket-propelled grenades and mortars from homes and a mosque in the village of Wanat in the northeastern province of Kunar, a mountainous region that borders Pakistan, NATO's International Security Assistance Force said in a statement.
The attack on the relatively new outpost began at 4:30 a.m. Sunday and lasted throughout the day.
Nine U.S. troops were killed in the attack, a Western official said on condition of anonymity because the deaths had not yet been officially announced.
Lt. Col. Rumi Nielson-Green, the top U.S. military spokeswoman in Afghanistan, said she could not comment because the battle was ongoing. She referred calls to NATO headquarters in Kabul.
NATO said in a statement there were casualties on both sides but accurate numbers could not be confirmed because the fighting was ongoing.
The attack appeared to be the deadliest for U.S. troops in Afghanistan since June 2005, when 16 American troops were killed - also in Kunar province - when their helicopter was shot down by a rocket-propelled grenade.
Those troops were on their way to rescue a four-man team of Navy SEALs caught in a militant ambush. Three SEALs were killed, the fourth was rescued days later by a farmer.
Motorcycle-Riding Suicide Bomber Kills 24
A suicide bomber on a motorcycle blew himself up next to a police patrol in southern Afghanistan on Sunday, killing 24 people, while a two-day battle sparked by an insurgent attack killed at least 40 militants, officials said.
The bombing attack in the southern province of Uruzgan also killed five police officers and wounded more than 30 others, said Juma Gul Himat, the province's police chief.
The bomber struck the police patrol at a busy intersection of Deh Rawood district, Himat said. The bombing also damaged or destroyed about nine shops in the area, he said.
Most of those killed and wounded were shopkeepers and young boys selling cigarettes and other goods in the street, Himat said.
Afghan civilians have suffered from a rash of bombings this month. About 55 civilians were killed in a massive bomb attack on the Indian Embassy in Kabul on Monday, while a government commission said this week U.S. air strikes killed 47 civilians in eastern Nangarhar province on July 6.
In Helmand province, a militant attack on Afghan and U.S.-led coalition forces sparked a battle that killed at least 40 militants, the coalition said in a statement.
The militants attacked the combined forces near Sangin on Saturday from "multiple concealed and fortified positions," the coalition said. Thirty "enemy boats" and several small bridges were destroyed on the Helmand River during two days of fighting.
A soldier with NATO's International Security Assistance Force died in a roadside blast in Helmand province Sunday, a statement said. The soldier's nationality was not released and it wasn't clear if the death was connected to the two-day battle.
More than 2,300 people - mostly militants - have died in insurgency-related violence this year, according to an Associated Press tally of official figures.
In eastern Kunar province, fighting erupted when militants attacked an outpost of the NATO-led force, the military alliance said in a statement.
NATO accused militants of using civilian homes and a mosque for cover. It said there were casualties on both sides, but it did not provide any figures.
Gen. Mohammad Zahir Azimi, a spokesman for Afghanistan's Defense Ministry, confirmed the fighting and said four Afghan soldiers were wounded.
In the country's north, a foreign soldier died of wounds caused by an explosion Saturday, NATO said without giving further details. The soldier's nationality was not disclosed.
Nearly 53,000 troops from 40 nations serve in the NATO-led force in Afghanistan.
Elsewhere, Taliban militants executed two women in central Afghanistan after accusing them of working as prostitutes on a U.S. base.
Taliban fighters told Associated Press Television News the two were executed for allegedly running a prostitution ring catering to U.S. soldiers and other foreign contractors at a U.S. base in Ghazni city.
1st Lt. Nathan Perry, a U.S. military spokesman, said he had never heard of allegations "anything close to that nature."
In the eastern Logar province, meanwhile, gunmen kidnapped parliament member Abdul Wali and his driver on Sunday, said provincial police chief Gen. Mohammad Mustafa.