The soldier accused of killing 17 Afghan villagers this month has reported suffering from severe nightmares, flashbacks of war scenes and persistent headaches after his multiple combat tours, his attorney said Wednesday.

Army Staff Sgt. Robert Bales told his legal team that he has long woken up with night sweats, often replaying memories of a grisly episode that he and his infantry company witnessed in Iraq several years ago, according to John Henry Browne, a civilian lawyer.

Browne’s comments amounted to the most detailed public portrayal so far of Bales’s state of mind in the months leading up to an incident in which the soldier stands accused of committing one of the worst U.S. atrocities in the decade-long war in Afghanistan.

Military officials and witnesses have alleged that Bales left his base in the pre-dawn hours of March 11 and methodically killed Afghan villagers — most of them women and children. He allegedly attempted to burn the bodies before returning to the base.

Browne, in an interview, did not acknowledge any wrongdoing by Bales, but the lawyer said his client told him that, on the night of the shootings, he returned to his base in southern Afghanistan with only a foggy memory of what had just happened. Bales, Browne said, remembered the smell of gunfire and of human bodies but not much more.

The lawyer stressed that Bales did not confess, as military officials have said, and seemed surprised when his weapon was taken away.

Bales, 38, is being held at Fort Leavenworth, Kan., pending a full military investigation. He faces the possibility of a death penalty on charges of premeditated murder.

Military officials have not offered any possible motive for Bales’s alleged actions, and the formal charges against him shed no light on the issue.

Unnamed military officials have said that Bales “snapped” as a result of marital and financial stress and that those factors were compounded by his consumption of alcohol that night, according to news reports. Bales had recently been passed over for a promotion, and he and his wife were under financial strain. This month, they put their Tacoma, Wash., area home up for sale for $50,000 less than the purchase price.

In recent years, Bales had several brushes with the law after incidents in which he was alleged to have been drinking.

Browne disputed any suggestion that alcohol may have played a role in the massacre in Afghanistan, calling such allegations “silly.” He said Bales had “two sips” of an unknown liquor that a Special Forces soldier had smuggled onto the base in a Gatorade bottle.

Browne, who met Bales face to face for the first time last week, said his client did, however, describe suffering symptoms strongly associated with post-traumatic stress disorder as a result of his combat experiences.

“There was a time when everyone in the room was crying when he described what he saw,” Browne said of the meeting that he, partner Emma Scanlan and a military defense lawyer had with Bales. Browne said the “horror of war” become a routine backdrop for Bales, who also reported “seeing bodies all over the place” and “putting body parts in bags” in Iraq.

Bales, who joined the Army in 2001, served three tours in Iraq. The second tour, during which he reportedly experienced a particularly harrowing incident, lasted from June 2006 through September 2007. Browne declined to discuss that episode, saying it was classified.

Bales did not share the seriousness of the PTSD-like symptoms with his wife, Karilyn, because he did not want to worry her, Browne said. In an interview with NBC News over the weekend, Karilyn Bales described her husband as a “very tough guy” who had shielded her from “a lot of what he went through.”

In a statement, a spokesman for Karilyn Bales said that her husband had told her about headaches but that there was never any discussion of PTSD.

“It never occurred to Kari to ask her husband, ‘Are you having nightmares?’ ” the spokesman, Lance Rosen, said Wednesday. “If he was having them, I can understand that he might not want to tell his wife. It would worry her. Soldiers are trained to be stoical.”

Browne said Bales also attributed his headaches to a concussive brain injury he suffered in Iraq when the Stryker vehicle he was riding in hit a roadside bomb and flipped over. No one was killed, but Bales was unconscious for an unspecified period.

Bales also lost a portion of his foot as a result of unsanitary conditions in his Iraq base that led to a methicillin-resistant Staphylococcus aureus, or MRSA, infection.

Before leaving for Afghanistan in December, Bales had been training to be an Army recruiter, Browne said. It was a role Bales appeared ideally suited for because of his longtime mentoring of younger soldiers — and he was told that he could begin the new job soon because his unit would not be redeployed.

Bales told his legal team that he remained a loyal soldier when he was shipped out unexpectedly on a fourth combat tour but was disturbed about the lack of a clear mission in Afghanistan, Browne said. As Bales and others in his unit sought to help the Afghan police secure an area, they fended off attacks from people who appeared to be civilians and Afghan allies.

“It was dispiriting,” Browne said. “He said he was really confused about why they were” in Afghanistan.

Staff writer Julie Tate contributed to this report.