A U.S. soldier accused of killing 16 Afghan civilians, many of them women and children asleep in their villages, pleaded guilty to murder and acknowledged that there was "not a good reason in this world" for his actions.

Robert Bales' plea Wednesday ensures that he will avoid the death penalty for the nighttime slayings.

Prosecutors say Bales slipped away from his base in Kandahar province before dawn on March 11, 2012. Armed with a 9mm pistol and an M-4 rifle equipped with a grenade launcher, 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 Bales is sentenced to life with or without the possibility of parole.