The case is the latest in a series of scandals for the US army

The girl and three family members were allegedly killed by four US soldiers.

Graphic details of the attack at the family's home came in a sworn statement by one of the accused, James P Barker.

The preliminary hearing will decide whether to court-martial the four. The case is one of a series of atrocities blamed on US forces in Iraq.

Along with Sergeant Paul Cortez, Private Jesse Spielman, and Private Bryan Howard, Specialist Barker is charged with rape and murder.

The four are alleged to have helped a former private - Steven Green, who has since left the army - plan, carry out and cover up the attack. Mr Green has pleaded not guilty in a federal court and will be tried separately in the US.

A fifth soldier is alleged to have lied to cover up for his colleagues.

'Whisky and golf'

Investigator Benjamin Bierce interviewed Mr Barker, 23, on 30 June and took down his statement, he told the hearing at a US military base in Baghdad.

On the day of the attack the soldiers had been drinking Iraqi whisky mixed with an energy drink and practising golf strokes at a checkpoint south of Baghdad, Mr Barker's statement said.

One of the soldiers, Steven Green, said he "wanted to go to a house and kill some Iraqis," it alleged.

The four eventually went to a house about 200 metres (yards) away and put the parents and their five-year old daughter in the bedroom, but kept the older girl in the living room.

According to Mr Barker's statement, he and Mr Cortez took it in turns to rape or attempt to rape her.

Mr Barker heard shots from the bedroom, and Steven Green emerged with an AK-47 in his hand saying "They're all dead. I just killed them."

Steven Green, who has pleaded not guilty, is being tried separately

According to the testimony, Mr Green then also raped the girl and shot her dead.

Her body was doused in kerosene and set alight.

The first day of the hearing on Sunday saw an Iraqi army medic describe how he found the bodies of the four Iraqis.

He told prosecutors he was ill for weeks after witnessing the crime scene.

Proceedings are expected to continue for several days.

BBC Baghdad correspondent Jane Peel says the Mahmudiya attack is one of the worst in a series of alleged atrocities committed by US troops in Iraq.

When news of it emerged last month it caused outrage and led to calls for changes in the agreement that exempts American soldiers from prosecution in the Iraqi courts.