Image caption Bales was charged with 16 counts of murder, six of attempted murder and seven of assault

US soldier Robert Bales has avoided the death penalty for murdering 16 Afghan civilians last year, after a military judge accepted his guilty plea.

Bales earlier admitted killing the civilians, saying there was "not a good reason in this world" for the massacre.

He said he wandered away from a US outpost in Kandahar province and attacked two villages nearby in the early hours of 11 March 2012.

A jury must now decide if Bales's life term will include possible parole.

The sentencing hearing has been scheduled for 19 August.

The judge, as well as the commander of Joint Base Lewis-McChord in Washington state, where the hearing has taken place, were required to approve any plea deal.

'Without justification'

At the start of the hearing on Wednesday, military judge Col Jeffery Nance asked Bales to describe why he thought he was guilty.

The soldier read from a statement describing each killing in the same terms:

"I left the VSP [Village Stability Platform] and went to the nearby village of Alkozai. While inside a compound in Alkozai, I observed a female I now know to be Na'ikmarga. I formed the intent to kill Na'ikmarga, and I did kill Na'ikmarga by shooting her with a firearm. This act was without legal justification, sir."

Media playback is unsupported on your device Media caption Defence lawyer John Henry Browne: "He's very relieved that the death penalty is not on the table"

When asked why he committed the murders, Bales responded: "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."

Asked about burning the victims, Bales said he remembered a kerosene lantern in the room and recalled a fire and having matches in his pocket when he returned to the base, but not setting the bodies on fire.

When pressed whether he had set the bodies on fire, Bales said: "It's the only thing that makes sense, sir."

Bales's lawyers have said he is contrite about the killings.

Lawyer John Henry Browne described Bales as "crazed" and "broken" on the night of the attack.

At the time, Bales was serving his fourth tour of duty and had been drinking alcohol and snorting Valium.

In addition to the 16 murdered, six Afghans were injured.

Afghans unsatisfied

Seventeen victims were women or children, and many of them were shot in the head. Some of the bodies were piled up and burnt.

Image caption Bales was on his fourth deployment to a combat zone

Bales's defence lawyers said they had determined the soldier would not be able to prove any claim of insanity or diminished capacity.

While prosecutors originally said they would seek the death penalty, no US service member has been executed in more than 50 years.

Family members of those killed earlier told the BBC they were outraged that he might not be put to death.

"We will not be satisfied unless he is executed," Haji Abdul Baqi, whose cousins were killed or injured in the attack, told BBC Afghan.

"If they don't execute him, they are showing their power. He martyred 16 of our people, but they are not executing the one person who did all that. Would they forgive us if we killed 16 Americans?"