JOINT BASE LEWIS-MCCHORD, Washington — Holding back tears, 15-year-old Rafiullah described how his grandmother wrestled with a uniformed gunman who put a pistol in his sister's mouth.

In the end, he added, the man shot all three of them, one by one.

Rafiullah's account is part of chilling testimony linked to the alleged slaughter of children and other civilians by a US soldier accused of going on a shooting rampage in Afghanistan eight months ago.

Rafiullah and other witnesses and relatives of the victims testified via video link at pre-trial hearings at a US military base in the western US state of Washington to determine whether the accused, Sergeant Robert Bales, should face court-martial.

Bales faces 16 counts of murder, six of attempted murder, seven of assault, two of using drugs and one of drinking alcohol. Seventeen of the 22 victims were women or children and almost all were shot in the head.

The 39-year-old allegedly left his base in the Panjwayi district of Kandahar province on the night of March 11 to commit the killings, which included nine children. He allegedly set several of their bodies on fire.

The massacre is thought to be the deadliest crime by a US soldier during the decade-long conflict and tested Washington and Kabul's already tense relationship to the limit.

Rafiullah, who spoke in Pashtun and donned traditional garb, said he was sleeping next to his grandmother, Na'ikmarga, and his sister, Zardana, when there was a knock on the door.

After his grandmother got up to see what was going on, the man "came into the room and asked me to come outside and we started shouting ... he was wearing a uniform," Rafiullah said, sniffing as he recounted the night's events.

Asked if the uniform worn by the man resembled those of US soldiers, he said "yes."

"He had rifle and a pistol," Rafiullah said of the man. "He put a pistol in my sister's mouth and then my grandmother started to wrestle with him. At that time I ran out of the door ... My sister and I were running. As soon as he left the room, my grandmother ran too."

When asked what happened next, Rafiullah responded: "He shot my grandmother and then my sister, and then me. He shot me on my legs. Zardana was shot on her head."

Samiullah, Rafiullah and Zardana's father who was in Kandahar City at the time of the attack, recalled the horror of coming home to carnage.

Upon arrival, he saw the bodies of four Afghans on the ground -- including those of a father and his daughter.

"She was laying by her father's side," he said of the girl. "She was shot on her head and her head was all bloody."

Zardana, who was seven when she was allegedly shot by Bales and received treatment at a US military hospital, also testified.

Wearing a purple head scarf and sipping from a juice box, she confirmed that her shooter was wearing a khaki-colored T-shirt.

Another witness was a young boy named Khan, dressed in black shirt and a traditional white cap who appeared to be several years older than Zardana, who watched his father being killed that night.

Bales remained silent throughout the testimony.

Last Monday, prosecutors laid out their case against Bales, saying he had been drinking whiskey with colleagues before the massacre and watching the movie "Man on Fire," starring Denzel Washington as an ex-assassin on a revenge mission.

Should the hearing result in a court-martial and Bales be found guilty, he could face the death penalty.

Bales was transferred from Afghanistan back to Fort Leavenworth in the US state of Kansas shortly after the alleged massacre, before being moved back to Fort Lewis-McChord recently, home base of the US 2nd Battalion, 3rd Infantry Regiment.

His wife and two children were moved to the sprawling military base south of Seattle for their own security, and to shield them from the glare of the media in the wake of the killings.

Before the hearings, Bales' wife reiterated her belief that he was innocent, saying he did not remember the shootings and was shocked when he was told details of the allegations against him.