The military on Friday identified the soldier accused of killing 16 Afghan villagers earlier this week as Staff Sgt. Robert Bales, a 38-year-old father of two who had been injured twice in combat over the course of four deployments and had, his lawyer said, an exemplary military record.

The release of Sergeant Bales’s name, first reported by Fox News, ended an extraordinary six-day blackout of public information about him from the Pentagon, which said it withheld his identity for so long because of concerns about his and his family’s security.

An official said on Friday that Sergeant Bales had been transferred from Kuwait to Fort Leavenworth, Kan., where he had a cell to himself in the medium-security prison there. His wife and children were moved from their home in Lake Tapps, Wash., east of Tacoma, onto Joint Base Lewis-McChord, his home base, earlier this week.

Military officials say Sergeant Bales, who has yet to be formally charged, left his small combat outpost in the volatile Panjwai district of Kandahar Province early in the morning last Sunday, walked into two nearby villages and there shot or stabbed 16 people, 9 of them children.