JOINT BASE LEWIS-McCHORD, Wash. — Staff Sgt. Robert Bales offered a tearful apology on Thursday for gunning down 16 unarmed Afghan civilians inside their homes, but said he still could not explain why he had carried out one of the worst American war crimes in years.

“What I did is an act of cowardice,” he said, choking up as he sat on the witness stand in a military courtroom here. “I’m truly, truly sorry for those people whose family members I’ve taken away.”

The unsworn statement from Sergeant Bales, 40, came on the third day of a hearing to determine whether he should ever be eligible for parole in the March 2012 massacre. In June, he pleaded guilty to slipping away from his combat base in southern Afghanistan and invading the mud-walled compounds where dozens of Afghan civilians slept. He beat and kicked them, chased them from room to room, opened fire on them, and set several of their bodies ablaze.

Two days of wrenching testimony from survivors and witnesses painted indelible images of the brutality of Sergeant Bales’ crimes, and their toll on the victims. Bearded Afghan men, who traveled some 7,000 miles to testify in the hearing, spoke of how nearly every member of their families had been taken. A skinny boy told how he cried after seeing his sister shot. A doctor described how a young girl named Zardana could no longer dress herself or go to the bathroom without help.