THE American soldier charged with killing 16 Afghan civilians during nighttime raids on two villages last year has pleaded guilty.

He then described shooting each victim, telling a military judge there is "not a good reason in this world" for why he did it.

To avoid the death penalty, Staff Sgt. Robert Bales pleaded guilty to multiple counts of murder at the hearing at Joint Base Lewis-McChord south of Seattle. He then read from a statement in a clear and steady voice, describing his actions for each killing in the same terms.

Bales, 39, said he left the remote base where he was posted in southern Afghanistan in March 2012, and went to the nearby villages of mud-walled compounds. Once inside, Sgt Bales said he "formed the intent" of killing the victims, then shot each one.

"This act was without legal justification, sir," Sgt Bales told the judge while seated at a defence table, his hands folded in front of him.

At one point, the judge, Col. Jeffery Nance, asked sgt Bales why he committed the killings.

Sgt 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."

Most of the victims were women and children, and some of the bodies were burned.

Relatives said they are irate at the notion Sgt Bales will escape execution for one of the worst atrocities of the Afghanistan war.

The judge still must decide whether to accept his plea.

Col. Nance also questioned Sgt Bales about the burned bodies. The soldier said he remembered there being a kerosene lantern in one of the rooms, and he recalled there being a fire and having matches in his pocket when he returned to the base. But Sgt Bales said he didn't remember setting the bodies on fire.

Col. Nance pressed him on whether he set the bodies on fire with the lantern, and Sgt Bales replied: "It's the only thing that makes sense, sir.'"

Defence attorney Emma Scanlan earlier entered Sgt 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.

Although Wednesday's proceedings provided Sgt Bales' account for the first time, 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.

Prosecutors say that before dawn on March 11, 2012, Sgt Bales slipped away from Camp Belambay in Kandahar Province, armed with a 9mm pistol and M-4 rifle outfitted with a grenade launcher.

He first attacked one village of mud-walled compounds, Alkozai, then returned to the base, woke up a fellow soldier and told him about it. The soldier didn't believe him and went back to sleep. Sgt Bales then left to attack a second village, Najiban.

The massacre prompted such angry protests that the US temporarily halted combat operations in Afghanistan, and it was three weeks before Army investigators could reach the crime scene.

Sgt Bales was serving his fourth combat deployment and had an otherwise good if undistinguished military record in a decade-long career.

The Ohio native suffered from post-traumatic stress disorder and a traumatic brain injury, his lawyers say, and he had been drinking contraband alcohol and snorting Valium - both provided by other soldiers - the night of the killings.

Prosecutors and defence lawyers considered the plea deal a win-win. Military law experts had suggested that given his prior deployments and apparent PTSD, it was unlikely a jury would sentence him to death

Nevertheless, the death penalty remained a possibility that Sgt Bales and his attorneys wanted off the table. Prosecutors were able to secure a premeditated murder conviction, which might have been difficult at trial given that Sgt Bales snapped.

Ultimately, that leaves the sentence as the only question: whether Sgt Bales will get life with the possibility of parole or without it. A jury is scheduled to decide that in August.