Media playback is unsupported on your device Media caption The BBC's Alastair Leithead was in court as the hearing began

A US soldier who killed 16 civilians in Afghanistan has been confronted by a victim, as his sentencing heard graphic details of the massacre.

Staff Sgt Robert Bales, 39, gunned down men, screaming children and elderly women, a jury at Washington state's Joint Base Lewis-McChord was told.

Mohammad Haji Naeem, whose son was killed, asked Sgt Bales why he carried out the shootings.

In June, he admitted the March 2012 massacre in a deal to avoid execution.

A military jury of six must decide whether or not he will ever be eligible for parole. The sentencing phase of the court martial will last from one to two weeks.

'Weapon on burst'

On Tuesday, one of nine Afghan villagers flown out to attend the trial angrily challenged Sgt Bales in court, which is south of Seattle.

In court Staff Sgt Robert Bales was wearing full military uniform as the judge began the hearing. Prosecutor Lt Col Jay Morse said witnesses on the Afghan base had described how Sgt Bales was "covered in the blood of his victims" after the massacre. Asked whose blood it was, he "shrugged his shoulders", the court heard. After the attack, Sgt Bales told colleagues: "I thought I was doing the right thing. I'm sorry I let you guys down. My count is 20," referring to the number of Afghans he believed he had killed. Sgt Bales listened to testimony translated from Pashtu as Mohammad Haji Naeem confronted him in court. Mr Naeem was shot in the jaw at close range, while his son was killed. A 12-year-old boy, Sadiquullah, told the court of his fear as Sgt Bales came into the compound and shot him in the ear, fracturing his skull.

Mohammad Haji Naeem was shot in the face at close range while his son was killed in the attack, near a remote base in Kandahar province.

"What have I done for you to shoot me in the jaw?" Mr Naeem asked the killer.

For more than an hour and a half, Army prosecutor Lt Col Jay Morse gave jurors the first detailed account of the massacre.

He described how Sgt Bales summarily killed a young girl who was screaming for him to stop beating her father.

Armed with a pistol, a rifle and wearing night-vision goggles, the Ohio native fired indiscriminately, slaughtering 11 members of a single family.

One woman was left clutching bits of her husband's skull, Col Morse said.

"The accused placed his weapon on 'burst' and murdered everyone in the room," the prosecutor told jurors, reports the Associated Press news agency.

The BBC's Alastair Leithead says photos and video of injured and dead were shown in court.

Sgt Bales returned to base for more ammunition, woke a fellow soldier and told him he had just shot some people.

The other soldier did not believe him and went back to sleep, the court heard. Sgt Bales left again to continue killing.

A young boy tried to stop Sgt Bales by hitting him with a shovel, but he turned and beat the child.

The court heard he then shot an elderly woman who challenged him, before crushing her skull by stamping on her head.

He poured kerosene from a lamp over the dead bodies and set them on fire.

'No good reason'

Sgt Bales "felt inadequate" at the time of the massacre because of personal, financial and professional problems, the prosecutor said.

Image caption Courtroom sketch of Mohammad Haji Naeem testifying

He was unhappy in his marriage, his home had lost value and he felt he deserved a promotion, according to the prosecutor.

A judge ruled on Tuesday that the Army can play extended clips of a recorded phone call between Sgt Bales and his wife after his arrest.

The tapes include Sgt Bales and his wife, Kari, laughing about the charges levelled against him and discussing a possible book deal for her.

A lawyer for Sgt Bales said the recorded clips had been taken out of context.

Sgt Bales' defence team hopes to win him parole by arguing that post-traumatic stress disorder and a brain injury were factors in the killings.

When asked in June by a military judge why he had carried out the murders, Sgt Bales responded: "There's not a good reason in this world for why I did the horrible things I did."

If he is sentenced to life with the possibility of parole, Sgt Bales could be eligible for release in 10 years.