The United States has pledged a thorough investigation into a killing spree by a rogue US soldier that left 16 Afghans dead, sparking a fresh crisis for US-Afghan relations.
US President Barack Obama described Sunday's massacre as "tragic and shocking", and called Afghan counterpart Hamid Karzai to express his "shock and sadness".
Karzai has responded furiously to the massacre, in which women and children were killed in their homes in a pre-dawn rampage, condemning it as "unforgivable."
It is the latest in a string of incidents which have tested the alliance between Washington and Kabul, and is likely to further increase the hostilitiy of the Afghan population towards US forces in the country.
Relations plunged to an all-time low last month after the burning of Korans at an American-run military base sparked days of deadly anti-US protests, which left some 40 people dead and prompted an apology from Obama.
In Sunday's shooting, an American soldier entered the homes of civilians in southern Kandahar province and killed 16 people including nine children and three women, according to a statement from Karzai.
It quoted a wounded 16-year-old, who was shot in the leg, as telling Karzai by phone that the US soldier entered their home in the dark, woke up his family members and then shot them.
An AFP reporter at the scene of the killings counted the bodies of 16 people, including women and children. In one house, an elderly woman screamed: "May God kill the only son of Karzai, so he feels what we feel."
In an angry statement after the shootings, the Afghan president said that "when Afghan people are killed deliberately by US forces this action is murder and terror and an unforgivable action.
"The government and the people of Afghanistan demand an explanation from the United States government of this incident," he said.
Obama quickly moved to assure Karzai, telling him in a phone call of Washington's "commitment to establish the facts as quickly as possible and to hold fully accountable anyone responsible," the White House said.
US Defense Secretary Leon Panetta also called Karzai and assured him that a "full investigation" was under way. In Brussels, Nato chief Anders Fogh Rasmussen expressed shock and offered his "heartfelt condolences".
The US embassy in Kabul sent out an alert to its citizens in Afghanistan warning that as a result of the shooting "there is a risk of anti-American feelings and protests in coming days".
Western sources said the rampage began after a US soldier walked off his base in the early hours of Sunday morning, apparently heavily armed and carrying night-vision equipment.
He was arrested outside the base after the shooting by members of the Afghan National Army, the army corps commander in southern Afghanistan, Abdul Hameed, told AFP.
Deteriorating US-Afghan relations risk complicating negotiations on a strategic partnership agreement between the two countries for when US combat operations end in 2014.
The treaty would likely cover the legal status of any US troops remaining in Afghanistan to help Kabul with intelligence, air power and logistics in the fight against Taliban insurgents.
In Iraq, Washington abandoned its pursuit of a strategic partnership deal and pulled out all its troops, leaving no residual force, after failing to get Baghdad to grant its soldiers legal immunity.
The shooting sparked renewed soul-searching in the US about the war, which began in 2001 when an American-led force toppled the Taliban regime in the wake of the September 11 attacks on the United States.
"There's something profoundly wrong with how we're approaching the whole region and I think it's going to get substantially worse, not better," Republican presidential hopeful Newt Gingrich told Fox News.
An Afghan government official, who described Karzai as "very angry" over the incident, said the president had dispatched the army chief of staff to head an investigation.
Afghan resentment of US forces has also been exacerbated by a video posted online in January showing US Marines urinating on the bloodied corpses of slain Afghan insurgents -- an incident condemned by the Pentagon.
And in November, the ringleader of a rogue American military "kill team" charged with murder for shooting civilians for sport was found guilty and sentenced to life in prison by a military panel.
Kandahar is a stronghold of Taliban insurgents fighting to oust Karzai's government, which is supported by some 130,000 US-led Nato troops.