Updated

Staff Sgt. Robert Bales was "crazed" and "broken" when he slipped away from his remote southern Afghanistan outpost and attacked mud-walled compounds in two slumbering villages nearby.

Next week, Bales will recount what happened next -- the slaughter of 16 villagers in one of the worst atrocities of the Afghanistan war. He'll give specific details in open court as he pleads guilty to the massacre to avoid being put to death.

His attorney, John Henry Browne, told The Associated Press that although his client's state of mind should be considered in sentencing, it didn't rise to the level of a legal insanity defense.

Browne said Bales as "crazed" and "broken" the night of the attack.

He said his client, who was on his fourth combat deployment, was suffering from post-traumatic stress disorder and a traumatic brain injury. He continued to blame the Army for sending him back to war in the first place.

"He's broken, and we broke him," Browne said.

The outcome of the case carries high stakes. The Army had been trying to have Bales executed, and Afghan villagers have demanded it.

In Afghanistan Thursday, a family member of a victim reacted angrily to the news that Bales might escape the death penalty.

"This is a shameful act by the Americans. They promised us the death penalty, and now they are going back on their word," said Baraan Noorzia, whose brother was killed in the massacre.

His comment echoed the reaction by other relatives last month in interviews with The Associated Press in Kandahar.

"For this one thing, we would kill 100 American soldiers," vowed Mohammed Wazir, who had 11 family members killed that night, including his mother and 2-year-old daughter.

"A prison sentence doesn't mean anything," said Said Jan, whose wife and three other relatives died. "I know we have no power now. But I will become stronger, and if he does not hang, I will have my revenge."

Any plea deal must be approved by the judge as well as the commanding general at Joint Base Lewis-McChord, where Bales is being held. A plea hearing is set for June 5, said Lt. Col. Gary Dangerfield, an Army spokesman. He said he could not immediately provide other details.

"The judge will be asking questions of Sgt. Bales about what he did, what he remembers and his state of mind," said Browne, who told the AP the commanding general has already approved the deal. "The deal that has been worked out ... is they take the death penalty off the table, and he pleads as charged, pretty much."

A sentencing-phase trial set for September will determine whether Bales is sentenced to life in prison with or without the possibility of parole.

Browne previously indicated Bales remembered little from the night of the massacre, and he said that was true in the early days after the attack. But as further details and records emerged, Bales began to remember what he did, the lawyer said, and he will admit to "very specific facts" about the shootings.

Browne would not elaborate on what his client will tell the judge.

Bales, an Ohio native and father of two from Lake Tapps, Wash., had been drinking contraband alcohol, snorting Valium that was provided to him by another soldier, and had been taking steroids before the attack. He slipped away from his remote southern Afghanistan outpost at Camp Belambay early on March 11, 2012, and attacked compounds.

Testimony at a hearing last fall established that Bales returned to his base between attacking the villages, woke up a fellow soldier and confessed. The soldier didn't believe him and went back to sleep, and Bales left again to continue the slaughter.

Most of the victims were women and children, and some of the bodies were piled and burned. The slayings drew such angry protests that the U.S. temporarily halted combat operations in Afghanistan. It was three weeks before American investigators could reach the crime scenes.

The massacre raised questions about the toll multiple deployments were taking on American troops. For that reason, many legal experts believed it that it was unlikely that he would receive the death penalty, as Army prosecutors were seeking. The military justice system hasn't executed anyone since 1961.

The defense team, including military lawyers assigned to Bales as well as Browne's co-counsel, Emma Scanlan, eventually determined after having Bales examined by psychiatrists that he would not be able to prove any claim of insanity or diminished capacity at the time of the attack, Browne said.

"His mental state does not rise to the level of a legal insanity defense," Browne said. "But his state of mind will be very important at the trial in September. We'll talk about his mental capacities or lack thereof, and other factors that were important to his state of mind."

Browne acknowledged the plea deal could inflame tensions in Afghanistan and said he was disappointed the case has not done more to focus public opinion on the war.

"It's a very delicate situation. I am concerned there could be a backlash," he said. "My personal goal is to save Bob from the death penalty. Getting the public to pay more attention to the war is secondary to what I have to do."