Pentagon officials on Friday identified the soldier who allegedly killed 16 Afghan villagers as Staff Sgt. Robert Bales, a trained Army sniper who had served three tours in Iraq and suffered war wounds.

Bales, a 38-year-old married father of two who enlisted in the months after the Sept. 11, 2001, attacks, was flown Friday to a military prison at Fort Leavenworth, Kan., to await possible criminal charges, according to a U.S. Army statement.

Bales is accused of leaving his base in the Panjwai district of Kandahar province; shooting 16 people, including nine children; and attempting to burn their bodies before returning to the base and turning himself in. He could face the death penalty, military officials have said.

The incident has sparked significant backlash in Afghanistan, straining already difficult relations with the United States over conduct of the war there.

The suspect’s name had been a closely kept secret since he allegedly surrendered to authorities after the shootings on Sunday morning. Officials confirmed his name after news organizations began reporting it Friday evening.

Bales’s attorney, John Henry Browne, has said that Bales did not want to deploy to Afghanistan in December, had experienced post-traumatic stress disorder stemming from his deployments and had suffered a head injury during a deployment in Iraq. Bales also had seen one of his fellow soldiers lose his leg in an explosion hours before he allegedly went on a rampage, Browne told reporters.

Army Capt. Chris Alexander, 28, who was Bales’s platoon leader during a deployment in Iraq, said in an interview Friday night that he “saved many a life” by never letting his guard down during patrols.

“Bales is still, hands down, one of the best soldiers I ever worked with,” Alexander said. “There has to be very severe [post-traumatic stress disorder] involved in this. I just don’t want him seen as some psychopath, because he is not.”

Bales, a member of the 3rd (Stryker) Brigade, 2nd Infantry Division, lived with his wife and young children in Lake Tapps, Wash., about a 20-minute drive east of Joint Base Lewis-McChord, near Tacoma. He attended high school in a Cleveland suburb but spent the past several years in Washington or on military deployments overseas.

His family was moved onto the base in recent days for their protection, officials have said.

The neighborhood where Bales lived includes many military families, according to neighbors. The family lived in a two-story beige house with a cedar-shake roof and a small front porch.

In 2007, Bales was part of a long, bloody battle in southern Iraq in which 250 enemy fighters were killed and 81 were wounded while members of Bales’s unit suffered no casualties, according to an Army account that described the battle as “apocalyptic.”

“I’ve never been more proud to be a part of this unit than that day,” Bales was quoted as saying. “We discriminated between the bad guys and the noncombatants and then afterward we ended up helping the people that three or four hours before were trying to kill us. I think that’s the real difference between being an American as opposed to being a bad guy, someone who puts his family in harm’s way like that.”

Bales said of the battle that “the cool part about this was World War II-style. You dug in. Guys were out there digging a fighting position in the ground.”

He also described an intense firefight as his unit tried to secure a downed helicopter: “It was like a match lit up. It looked like a toy with a candle lit underneath it.”

He received more than a dozen medals and badges for his service overseas and for good conduct, according to the Army statement. But in her blog last year, his wife, Karilyn, said he was disappointed that he was not promoted to sergeant first class.

In a post dated March 25, she noted “all of the work Bob has done and all the sacrifices he has made for his love of his country, family and friends.”

“I am sad and disappointed too,” she wrote, “but I am also relieved, we can finally move on to the next phase of our lives.”

That meant a different duty station, hopefully in Germany, Italy or Hawaii, she wrote.

In previous blog posts she wrote of how difficult it was for her while Bales was deployed during the pregnancy of her first child but how excited he was to learn that their first born was going to be a girl. “Our baby girl will most definitely be Daddy’s Little Girl!” she wrote.

Government officials, in some news reports, have said Bales may have been drinking on the night of the shootings and was agitated by marital problems at home. Browne disputed that, saying the reports were “very offensive.” The couple had financial problems but nothing severe, he said, adding that they had “a very strong marriage.”

Family members of Bales could not be reached for comment Friday night.

While living outside Tacoma, Bales had brushes with the law, according to court records and news accounts. In 2002, he was charged with misdemeanor criminal assault, according to the Tacoma News Tribune. The charge was dismissed after he paid a $300 fine and completed an anger management assessment, the newspaper reported.

Then in 2008, witnesses told police they saw him running from a single-car rollover, the newspaper reported.

Witnesses told the News Tribune they saw a “white man wearing military style uniform, shaved head and bleeding” running into the woods. Bales later told a police officer that he had fallen asleep while driving. Bales received a 12-month deferred sentence and paid a fine of $250 and the charges were dismissed, according to the report.

With limited facts about the motive in Sunday’s shooting, some veterans groups and mental health advocates fear that the image being stitched together from the loose assemblage of facts is of a crazy veteran gone wild.

“The main concern is that we’ll be back where we started with a stigma that all veterans that return are broken in some way,” said Ryan Gallucci, deputy director of national legislative service for the Veterans of Foreign Wars.

On Friday, Gen. David M. Rodriguez, commander of the U.S. Army Forces Command, which is in charge of training and equipping soldiers for war, said the Army has done a “very, very good job of sustaining” troops through multiple combat deployments.” He said the decision of whether to send soldiers on multiple deployments are made “on a case-by-case basis.”

“There is not a cookie-cutter solution or rule that says this guy can handle two or three [tours],” he said. “It’s about taking care of soldiers.”

Some fear that the stereotype of veterans as unstable at best and violent at worst will be resurrected. Many veterans spoke out against a headline about the shootings in the New York Daily News this week that read, “Sergeant Psycho.”

Tom Tarantino, the deputy policy director at Iraq and Afghanistan of America, said that without the facts, “you have this wired mind-set in the public consciousness and immediately everyone goes to the ‘Sergeant Psycho’ thing.”

Many veterans advocates have dismissed simple theories about what set off the killings.

“There are plenty of service members with stress and trauma who are drinking and self-medicating every day to deal with their conditions, and they don’t go out and gun down a bunch of women and children,” said Josh Renschler, the director of Men of Valor, a service member support group.

He argued that while bouts of rage can be caused by traumatic brain injuries or post-traumatic stress disorder, they alone are not sufficient to explain killing of this magnitude.

Jonathan Shay, a clinical psychiatrist and author who was awarded a MacArthur “genius grant” for his work with veterans, wondered about the soldier’s relationship with the Special Operations forces — which can be very standoffish to outsiders — that he was attached to at a remote outpost in Afghanistan. “To me this is a presumptive case of leadership failure,” he said. “Whoever was directly responsible for this soldier did not do his job in the sense of getting to know him.”

Flaherty reported from Tacoma. Staff writers Craig Whitlock, Peter Finn and William Branigin, staff researchers Julie Tate, Lucy Shackleford and Madonna Leibling, and research editor Alice Crites contributed to this report.