The massacre of 16 villagers by a U.S. soldier triggered angry calls from Afghans for an immediate American exit even as the Obama administration vowed on Monday that the killings would not alter U.S. plans for the war.
Just days before Sunday's attack, Kabul and Washington had made significant progress in negotiations on a strategic partnership agreement that would allow American advisers and special forces to stay in Afghanistan after most foreign combat troops leave at the end of 2014.
But securing a full deal may be far more difficult now after a U.S. Army staff sergeant walked off his base in the southern province of Kandahar in the middle of night and gunned down at least 16 villagers, mostly women and children.
This could delay the signing of the Strategic Partnership Agreement, an Afghan government official told Reuters.
The attack was the latest incident to ignite Afghan anger at the United States, coming on the heels of U.S. soldiers' burning of copies of the Koran on a NATO base last month, and other incidents that have intensified America's perception problem in Afghanistan.
U.S. President Barack Obama and his NATO partners intend to pull most of their troops out of Afghanistan by the end of 2014, leaving an inexperienced local army in charge.
Officials in Washington denied suggestions that the killings might alter U.S. plans.
I do not believe this incident will change the timetable of a strategy that was designed and is being implemented in a way to allow for the withdrawal of U.S. forces, to allow for their transfer of lead security authority over to the Afghans, White House spokesman Jay Carney told reporters.
The soldier, who has not been publicly identified, is now in U.S. custody in Kandahar, a congressional source said on condition of anonymity. After leaving the Belambai base, the soldier began shooting people in two nearby villages, the source said. Five Afghans were wounded in addition to those killed.
The motive for the shooting was not immediately clear. The soldier was part of the 2-3 Infantry, 3rd Stryker Brigade Combat Team, from the Lewis-McChord base in Washington state. After serving three tours in Iraq, he arrived in Afghanistan in December and has been at the Belambai base since February 1.
General John Allen, who commands U.S. and NATO troops in Afghanistan, told CNN that an Afghan soldier reported seeing the soldier leave the base, and that a search party was being assembled when reports of the attacks started to come in.
Allen declined to comment on reports that the sergeant had suffered a brain injury in the past.
U.S. officials, who have rushed to distance the shootings from the efforts of the 90,000-strong U.S. force that over the past year has beaten the Taliban back from much of southern Afghanistan, say an investigation was under way but did not know when it would conclude.
Afghanistan's parliament condemned the killings, saying Afghans had run out of patience with the actions of foreign forces and the lack of oversight. Civilian deaths have long been one of the main sources of tension between Kabul and Washington.
We have benefited little from the foreign troops here but lost everything - our lives, dignity and our country to them, said Haji Najiq, a Kandahar shop owner.
The explanation or apologies will not bring back the dead. It is better for them to leave us alone and let us live in peace.
The incident is another unwelcome challenge for the Obama administration's efforts to establish stability - which will require the support of ordinary Afghans - more than 10 years after the Taliban government was toppled in an American invasion.
U.S. Representative Howard McKeon, Republican chairman of the House of Representatives Armed Services Committee, said through a spokesman that now is not the time to abandon hope and freedom's cause, but to persevere, and urged Obama to rally the American people to this cause and demonstrate the will to win.
U.S. officials warned of possible reprisal attacks after the villagers were killed in the likely rogue shooting.
Fury over the killing spree, which brought demands that the United States withdraw earlier than scheduled, could be exploited by the Taliban to gain new recruits.
Anti-Americanism, which boiled over after the Koran-burning incident, might deepen after the Kandahar carnage.
The Americans said they will leave in 2014. They should leave now so we can live in peace, said Mohammad Fahim, 19, a university student. Even if the Taliban return to power our elders can work things out with them. The Americans are disrespectful.
The civilian deaths may also force Afghan President Hamid Karzai to harden his stance in the partnership talks to appease a public already critical of his government's performance.
The Americans are not here to assist us they are here to kill us, said Najibullah, 33, a house painter in Kabul.
I hate the Americans and I hate anyone who loves them, so I hope there is no long-term partnership between our countries.
The partnership agreement, which Washington and Kabul have been discussing for more than a year, is expected to be a framework for U.S. involvement in Afghanistan after foreign combat troops leave at the end of 2014.
Without a pact that keeps U.S. advisers or special forces in the country, there is a danger that civil war could erupt again in Afghanistan.
The Kandahar violence came just days after the United States and Afghanistan signed a deal on the gradual transfer of a major U.S.-run detention centre to Afghan authorities, overcoming one of the main sticking points in the partnership negotiations.
Afghanistan wants a timeline to take over detention centres and for the United States and NATO to agree to end night raids on Afghan homes as preconditions for signing the pact.
Pentagon spokesman George Little said U.S. strategy would continue as it had before Sunday's shooting.
There has been a series of troubling incidents recently, but no one should think that we are steering away from our partnership with the Afghan people, our partnership with Afghan National Security Forces, and our commitment to prosecute the war effort, he told reporters.
Allen acknowledged the shooting was a setback but said: We're going to ensure that this relationship, which is resilient and possesses a lot of shock absorbency, that this relationship is the one that defines the success of our campaign.
U.S. forces invaded Afghanistan in 2001 to topple the Taliban rulers who had harboured the al Qaeda network responsible for the September 11 attacks of the United States. Kandahar is the birthplace of the Taliban.
Southern and eastern provinces have seen some of the fiercest fighting of the war.
The Kandahar shootings will give the Taliban the chance to prove to Afghans that they are the freedom fighters and the Americans are the evil ones, said Waheed Mujhda of the Afghan Analysts Network.
Sunday's attack may also harden a growing consensus in Washington about what can - and can't - be accomplished in Afghanistan.
The bill for the war has already exceeded $500 billion and more than 1,900 U.S. troops have been killed, with the total number of foreign troops killed approaching 3,000.
Not only will this horrific incident enrage average Afghans, it will likely significantly impact the American public attitude toward the war and renew calls for speeding up the pace of U.S. troop withdrawals, said Lisa Curtis, a security expert at the Heritage Foundation.
Karzai, whose relationship with his Western backers is troubled even in the best of times, condemned the rampage as intentional murders and demanded an explanation. Karzai's office released a statement quoting a villager as saying American soldiers woke my family up and shot them in the face.
Amnesty International warned that those behind such attacks must be brought to justice or it would risk reinforcing a perception among many Afghans - fuelled by the Taliban - that NATO had not done enough to keep Afghan civilians safe.
(Additional reporting by Hamid Shalizi and Mirwais Harooni in KABUL; Susan Cornwell, Missy Ryan, Alister Bull in WASHINGTON; Michelle Nicols, Louis Charbonneau and Emily Flitter in NEW YORK; Writing by Michael Georgy; Editing by Missy Ryan and Cynthia Osterman)