A soldier was sentenced to 90 years in prison with the possibility of parole in 20 years for conspiring to rape a 14-year-old Iraqi girl and kill her and her family.

Spc. James P. Barker, one of four Fort Campbell soldiers accused in the March 12 rape of Abeer Qassim al-Janabi and the killings, pleaded guilty and agreed to testify against the others to avoid the death penalty.

"This court sentences you to be confined for the length of your natural life, with the eligibility of parole," said Lt. Col. Richard Anderson, the military judge presiding over the court-martial.

Under the plea agreement, Barker got a life sentence Thursday but will not serve more than 90 years in prison, Anderson said. He will be eligible for parole in 20 years.

Barker, 23, showed no reaction when the sentence was read.

Earlier Thursday, Barker wept during his closing statement, accepted responsibility for the rape and killings and said violence he encountered left him "angry and mean" when it came to Iraqis.

"I want the people of Iraq to know that I did not go there to do the terrible things that I did," Barker said, his voice quivering as he began to weep. "I do not ask anyone to forgive me today."

After Barker's sentencing, military prosecutors declined to comment because three other soldiers have yet to be tried in the case. Defense attorneys planned a news conference.

Barker confessed Wednesday to the crimes as part of a plea agreement to avoid a possible death penalty that requires him to testify against the others.

In his closing statement, Barker said Iraq made him angry and violent.

"To live there, to survive there, I became angry and mean. The mean part of me made me strong on patrols. It made me brave in fire fights," Barker said. "I loved my friends, my fellow soldiers and my leaders, but I began to hate everyone else in Iraq."

During testimony intended to show the judge that Barker could be rehabilitated, Barker's fellow soldiers described weeks with little support and sleep while manning distant checkpoints.

Capt. William Fischbach, the lead prosecutor, told the court that such conditions were no excuse for Barker, who led the group to the family's house, and that no one deserved such unspeakable horrors.

"This burned-out corpse that used to be a 14-year-old girl never fired bullets or lobbed mortars," Fischbach said as he held pictures of the crime scene. "Society should not have to bear the risk of the accused among them ever again."

The killings in Mahmoudiya, a village about 20 miles (32 kilometers) south of Baghdad, were among the worst in a series of alleged attacks on civilians and other abuses by military personnel in Iraq.

The defendants are accused of burning the girl's body to conceal the crime.

Sgt. Paul E. Cortez, 24, and Pfc. Jesse V. Spielman, 22, members of the 101st Airborne Division along with Barker, have also been charged. Cortez has deferred entering a plea, and Spielman will be arraigned in December. Pfc. Bryan L. Howard, 19, also deferred entering a plea at his arraignment in October.

Private Steven Green, 21, pleaded not guilty last week to civilian charges including murder and sexual assault. He was discharged from the Army for a "personality disorder" before the allegations became known, and prosecutors have yet to say whether they will pursue the death penalty against him.

In earlier testimony, Barker described in detail how he raped Abeer Qassim al-Janabi with Cortez and Green before Green killed the girl, her younger sister and parents.

"Cortez pushed her to the ground. I went towards the top of her and kind of held her hands down while Cortez proceeded to lift her dress up," he said. "Around that time I heard shots coming from a room next door."

Cortez and Spielman could face the death penalty if convicted.

Barker did not name Spielman and Howard as participants in the rape and murders but said Spielman was at the house when the assault took place and had come knowing what the others intended to do. Prosecutors on Thursday said Howard had been left behind at a checkpoint.

Complete coverage is available in FOXNews.com's Iraq Center.