JOINT BASE LEWIS-MCCHORD, WASH. — Seated at a table with his hands folded in front of him, twiddling his thumbs, an American soldier dryly spoke about how he slipped away from his base in Afghanistan last year in the middle of the night and killed 16 civilians, later setting some bodies on fire with a kerosene lantern.

Many of his victims were women and children who were asleep in their villages when Staff Sgt. Robert Bales approached, armed with a 9 mm pistol and an M-4 rifle equipped with a grenade launcher.

Responding to a military judge who accepted his guilty plea — allowing him to avoid the death penalty — Bales on Wednesday acknowledged that he raised his weapon and opened fire multiple times. But the married father of two couldn’t say why he committed one of the worst atrocities of the war.

“Sir, as far as why — I’ve asked that question a million times since then. There’s not a good reason in this world for why I did the horrible things I did,” he said.

For each charge, Col. Jeffery Nance asked him a series of questions to assess the validity of his plea. Did he believe he had legal justification to kill the victims? Was he acting in self-defense? Did anyone force or coerce him to commit the murders?

Bales’ plea ensures that he will avoid the death penalty for the middle-of-the night slayings that so inflamed tensions with the people of Afghanistan that the American military suspended combat operations there. It was three weeks before Army investigators could reach the crime scene.

In Afghanistan on Thursday, family members of victims said they were outraged that Bales will not face the death penalty.

“I am shocked to see that a person who killed 16 and wounded six has been given such leniency,” said Baraan Noorzia, whose brother was killed. “We will raise our voices from here to our president, to all human right organizations, and the American people that there should be no mercy for a person who carried out such a massacre.”

A man who lost his wife and three other family members said the outcome isn’t acceptable.

“If there is no death penalty over there for him, then he should be brought to Afghanistan because he is guilty and he did this crime,” said Sayed Jan. “From day one we have been saying that he should have been put on trial here.”

Prosecutors say Bales left on March 11, 2012, from his base in Kandahar Province. He attacked a village of mud-walled compounds called Alkozai, then returned and woke up a fellow soldier to tell him about it.

The soldier didn’t believe Bales and went back to sleep. Bales then left to attack a second village known as Najiban.

A jury will decide in August whether the soldier is sentenced to life with or without the possibility of parole. He would serve his prison sentence at Fort Leavenworth, the military prison in Kansas. If he is sentenced to life with the possibility of parole, he’d be eligible in 10 years, but there is no guarantee he would receive it.

Wednesday’s proceedings at Joint Base Lewis-McChord, south of Seattle, marked the first time Bales provided a public account of the massacre.

One of the prosecutors, Lt. Col. Jay Morse, raised concerns during the hearing that the soldier’s testimony contradicted what he earlier acknowledged in a signed “stipulation of facts” from that night.

Bales testified Wednesday that he made the decision to kill each victim when he raised his gun and pointed it. But in the stipulation, Bales said he struggled with a woman before killing her and “after the tussle” decided to “murder anyone that he saw.”

The judge questioned Bales about it, and Bales confirmed that he decided to kill everyone after struggling with the woman.

Nance also questioned Bales about some corpses that had been set on fire. Bales said he didn’t remember burning the bodies, but he recalled a kerosene lantern being in one of the rooms and a fire and having matches in his pocket when he returned to the remote base, Camp Belambay.

Pressed by the judge on whether he set the bodies on fire with the lantern. Bales replied: “It’s the only thing that makes sense, sir.’”

Earlier, defense attorney Emma Scanlan entered Bales’ pleas on his behalf. She entered one not guilty plea — to a charge that he impeded the investigation by breaking his laptop after he was taken into custody. That charge was later dropped, after the judge accepted the guilty plea.

Survivors who testified by video link from Afghanistan during a hearing last fall vividly recalled the carnage.

A young girl in a bright headscarf described hiding behind her father as he was shot to death. Boys told of hiding behind curtains as others scrambled and begged the soldier to spare them, yelling: “We are children! We are children!” A thick-bearded man told of being shot in the neck by a gunman “as close as this bottle,” gesturing to a water bottle on a table in front of him.

The deaths raised questions about the frequency of combat deployments and post-traumatic stress disorder.

Bales was serving his fourth deployment. Until the attacks, he had a good, if undistinguished, military record in a decade-long career. The Ohio native suffered from PTSD and a traumatic brain injury, his lawyers say, and he had been drinking contraband alcohol and snorting Valium — both provided by Special Forces soldiers — the night of the killings.

Bales said he was also taking three doses of steroids each week to make himself “smaller, leaner, more fit for the mission,” and to help him recover quickly after rigorous activity.

The drugs “definitely increased my irritability and anger,” he said.

Given Bales’ prior deployments and apparent PTSD, military law experts had suggested that a jury was unlikely to sentence him to death. Defense attorney John Henry Browne had sought to place blame with the military for sending Bales back to war in the first place.

Bales and his defense team wanted the death penalty off the table. Prosecutors were able to secure a premeditated murder conviction, which might have been difficult to obtain at trial.

Bales’ attorneys said afterward that he is remorseful and that he didn’t apologize in court because now is not the time.

“There’s no justification. He doesn’t have one and neither do we,” Scanlan said.

They also said Bales hopes villagers in Afghanistan do not take retribution against other American soldiers.

“Sergeant Bales has been waiting for the day that he can accept responsibility for what he’s done, the day that he can hopefully give some sense of peace to the people who are the victims of this tragedy, to his own family, and to the soldiers who are still serving in Afghanistan,” said Scanlan, adding the defense hoped to convince the military jury that someday Bales should have a chance to see his family again.

“Sgt. Bales is a person who would not have done this but for a set of conditions,” she said. “But for being on his fourth deployment. But for some things in his own mind that couldn’t be helped. But for the substances provided to him by the Special Forces.”