Robert Bales was "crazed" and "broken" when he slipped away from his Afghanistan outpost and attacked mud-walled compounds in two villages nearby, killing 16, his lawyer has said.
Bales, charged with killing the villagers in March 2012 in one of the worst atrocities of the Afghanistan war, will plead guilty to avoid the death penalty. The deal will require him to recount the horrific attack for the first time, his lawyer John Henry Browne said.
The Army had been trying to have Bales executed, and Afghan villagers have demanded it. In interviews last month, relatives of the victims became outraged at the notion that he might escape the death penalty.
"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 two-year-old daughter. Most of the victims were women and children, and some of the bodies were burned.
The killings drew such angry protests that the US temporarily halted combat operations in Afghanistan. It was three weeks before US investigators could reach the crime scenes.
Any plea deal must be approved by the judge as well as the commanding general at the US base where Bales is being held. A plea hearing is set for June 5, said Lt Col Gary Dangerfield, an Army spokesman.
"The judge will be asking questions of Sgt Bales about what he did, what he remembers and his state of mind," said Mr Browne. He said the commanding general has already approved the deal, and a sentencing-phase trial is set for September.
Mr Browne previously indicated that Bales remembered little from the night of the massacre. 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.
Bales had been drinking contraband alcohol and snorting Valium that was provided to him by another soldier and had been taking steroids before the attack. Evidence at a hearing last year established that Bales returned to his base between attacking the two villages, woke up a fellow soldier and confessed. The soldier did not believe him and went back to sleep, and Bales left again to continue the slaughter.
Mr Browne 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," Mr Browne said.