The unidentified staff sergeant is now in custody, accused of killing 16 Afghan civilians, most of them children, and then burning many of the bodies.
Sunday's attack in southern Kandahar province comes as anti-Americanism already is boiling over in Afghanistan after U.S. troops burned Qurans last month and a video of Marines urinating on alleged Taliban corpses was posted on the Internet in January.
Now, another wave of anti-foreigner hatred could threaten the future of the U.S.-led coalition's mission in Afghanistan. The events have not only infuriated its people and leaders, but have also raised doubts among U.S. political figures that the long and costly war is worth the sacrifice in lives and money.
NATO and member countries said the slayings were a blow to the alliance's efforts to cultivate trust but would not affect the timeline to hand over security operations to Afghans by the end of 2014. The White House said U.S. objectives will not change because of the killings.
Outraged Afghan lawmakers called for a suspension of talks on how to formalize a long-term U.S. military presence in the country and demanded that the shooter face trial in an Afghan court.
The soldier's name has not been released. He was deployed to Afghanistan on Dec. 3 with the 2nd Battallion, 3rd Infantry Regiment of the 3rd Stryker Brigade, 2nd Infantry Division, based at Joint Base Lewis-McChord located south of Seattle, according to a congressional source, speaking on the condition of anonymity because of the sensitivity of the matter.
He was attached Feb. 1 to the village stability program in Belambai, a half-mile from one of the villages where the attack took place, the source said.
The soldier, who has been in the military for 11 years, served three tours in Iraq and is married with two children, was being held in pretrial confinement in Kandahar by the U.S. military while Army officials review his complete deployment and medical history, according to the source.
Villager Mohammad Zahir told how he watched the soldier enter his house and move through it methodically, checking each room.
"I heard a gunshot. When I came out of my room, somebody entered our house. He was in a NATO forces uniform. I didn't see his face because it was dark," he said.
Zahir, 26, said he quickly went to a part of the house where animals are penned.
"After that, I saw him moving to different areas of the house - like he was searching," he said.
His father, unarmed, then took a few steps out of his bedroom, Zahir recalled.
"He was not holding anything - not even a cup of tea," Zahir said. Then the soldier fired.
"I love my father, but I was sure that if I came out he would shoot me too. So I waited." Zahir said. His mother started pulling his father into the room, and he helped cover his father's bullet wound with a cloth. Zahir's father survived.
After the gunman left, Zahir said he heard more gunshots near the house, and he stayed in hiding for a few minutes to make sure he was gone.
The shooting rampage unfolded in two villages near a U.S. base. An enraged President Hamid Karzai called it "an assassination, an intentional killing of innocent civilians" that cannot be forgiven. He demanded an explanation from Washington for the deaths, which included nine children and three women.
Tensions between Afghanistan and the United States soared last month after word of the Quran burnings got out. President Barack Obama said the burnings were a mistake and apologized.
The strains had appeared to be easing as recently as Friday, when the two governments signed a memorandum of understanding about the transfer of Afghan detainees to Afghan control - a key step toward an eventual strategic partnership to govern U.S. forces in the country after most combat troops leave in 2014.
In Afghanistan's parliament, however, lawmakers called Monday for a halt to talks on the strategic partnership document until it is clear that soldier behind the shooting rampage is facing justice in Afghanistan.
"We said to Karzai: If you sign that document, you are betraying your country," said Shikiba Ashimi, a parliamentarian from Kandahar. "There is no more tolerance for this kind of incident. It is over, over. We want such people on trial inside Afghanistan, in Afghan courts."
"The U.S. should be very careful. It is sabotaging the atmosphere of this strategic partnership," she added.
Currently, American service members in Afghanistan are subject to U.S. military law and proceedings. But the parliamentarians said they want this changed in the document under negotiation. The U.S. is unlikely to agree to that issue, pulling out of Iraq when Baghdad demanded the right to prosecute U.S. forces.
The photographs of dead toddlers wrapped in bloody blankets in Panjwai district started to make the rounds in Afghanistan on Monday. The images were broadcast on Afghan TV stations, and people posted them on social network sites and blogs.
Still the public response to the shootings so far has been calmer than the six days of riots and attacks after Qurans were burned at Bagram Air Field, leaving 30 people dead including six U.S. soldiers.
The more muted response could be a result of Afghans being used to dealing with civilian casualties over a decade of war. Some said the slayings in Panjwai was more in keeping with Afghans' experience of deadly night raids and airstrikes than the Quran burnings were.
"It's not that these things have an immediate effect, it's that they exacerbate tensions, and I think we're seeing the U.S. and the Afghan governments being really impatient with each other. There's an element of mistrust, and these incidents really exacerbate that," said Kate Clark, of the Kabul-based Afghan Analysts Network.
There's also a question of how the slayings will affect ongoing attempts to negotiate with the Taliban, who may feel that they have a stronger position to appeal to the people. The insurgent group vowed revenge for the attack.
The al-Qaida-linked militant group said in a statement on their website that "sick-minded American savages" committed the "blood-soaked and inhumane crime" in a rural region that is the cradle of the Taliban and where coalition forces have fought for control for years.
U.S.-led forces in Afghanistan have stepped up security following the shootings out of concern about retaliatory attacks. The U.S. Embassy has also warned American citizens in Afghanistan about the possibility of reprisals. As standard practice, the coalition increased security following the shootings out of concern about retaliatory attacks, said German Brig. Gen. Carsten Jacobson, a coalition spokesman.
The suspect in the shootings began his first deployment to Afghanistan in December, according to a senior U.S. official. However, he had only been assigned to the base in Panjwai about six weeks ago, the congressional source said.
He is from Joint Base Lewis-McChord, Wash., and was assigned to support a special operations unit of either Green Berets or Navy SEALs engaged in a village stability operation, said a U.S. official, speaking on condition of anonymity because the investigation is still ongoing. Special operations troops pair with local residents chosen by village elders to become essentially a sanctioned, armed neighborhood watch.
The Army Criminal Investigation Division has started an investigation into the incident, said Chris Grey, a spokesman for the division. He declined to give other details to protect the integrity of the investigation.
The Afghan Defense Ministry said the gunman left the base in Panjwai district and walked about one mile (1,800 meters) to Balandi village. Villagers described how they cowered in fear around 3 a.m. as gunshots rang out and the soldier roamed from house to house, firing on those inside. They said he entered three homes in all and set fire to some of the bodies after he killed them.
Eleven of the 12 civilians killed in Balandi were from the same family. The remaining victim was a neighbor.
From Balandi, the gunman walked roughly one mile to the village of Alkozai, which was only about 500 meters from the American military base. There the gunman killed four people in one house and then moved to Zahir's house, where he shot his father in the leg.
U.S. officials said initial reports indicated that the soldier returned to his base after the shootings and turned himself in.
Some Afghan officials and villagers expressed doubt that a single U.S. soldier could have carried out all the killings and burned the bodies afterward. Some villagers also told officials there were multiple soldiers and heard shooting from different directions. But many others said they only saw a single soldier.
Lt. Col. Jimmie Cummings, another spokesman for the coalition, insisted there was only one gunman.
"There's no indication that there was more than one shooter," he said.
Agha Lalia, member of the Kandahar provincial council who is from Panjwai district, said he spoke to two people who were injured in the shooting at a hospital at Kandahar Air Field, where they are being treated by coalition medical personnel. Both said they only saw one soldier shooting.
Associated Press writers Rahim Faiez, Amir Shah, Sebastian Abbot and Deb Riechmann in Kabul and Pauline Jelinek in Washington contributed to this report. Gene Johnson contributed from Seattle.