The sentence was part of a plea agreement attorneys for Pfc. Jesse Spielman, had made with prosecutors that limited the number of years he could serve in prison, regardless of the jury's recommendation.
Spielman, 23, of Chambersburg, Pa., was convicted late Friday of rape, conspiracy to commit rape, housebreaking with intent to rape and four counts of felony murder.
Jurors deliberated much of Friday evening before convicting Spielman, who received the longest sentence of four soldiers who have been convicted. Three other soldiers pleaded guilty under agreements with prosecutors for their roles in the assault and were given sentences ranging from five to 100 years.
The attack took place in Mahmoudiya, a village about 20 miles south of Baghdad.
Military prosecutors did not say Spielman took part in the rape or murders, but alleged he went to the house knowing what the others intended to do and served as a lookout. Spielman had pleaded guilty on Monday to lesser charges of conspiracy to obstructing justice, arson, wrongfully touching a corpse and drinking.
Spielman's grandmother, Nancy Hess, collapsed outside the courtroom after the verdict was read. Medics were called to the courthouse as soldiers in Spielman's unit fanned the woman with napkins.
His sister, Paige Gerlach, screamed: "I hate the government. You people put him (in Iraq) and now, this happened."
Defense attorneys left the courthouse immediately following the verdict and could not immediately be reached for comment.
Prosecutors rested their case Thursday amid struggles to overcome a fellow soldier's recanting of a story that Spielman acted as a lookout during the attack last year.
Spc. James Barker, who has admitted his own role in the assault, said in earlier testimony that he had allowed investigators to draft sworn statements for him that implicated Spielman in the crime.
Barker testified Wednesday that several portions of the document were untrue, including references to Spielman's role in the conspiracy to attack the family and his knowledge of plans to rape the girl.
Another soldier convicted in the attack, Sgt. Paul E. Cortez, testified that Spielman stood guard as his fellow soldiers raped the girl. Cortez said Spielman was within a few feet of the others as they held down the screaming girl but did nothing to stop them.
Barker, Cortez and another soldier, Pfc. Bryan L. Howard, pleaded guilty for their roles in the slayings and received sentences of five to 100 years under plea agreements with prosecutors.
Steven D. Green, who was discharged from the Army before being charged, faces a possible death sentence when he is tried in federal court in Kentucky. He has pleaded not guilty to charges that include murder and sexual assault.
Barker and Cortez have given investigators conflicting statements about whether Spielman knew of the plan to rape the girl and was present when they discussed it over swigs from bottles of whiskey and gin mixed with energy drinks, according to testimony.
During their courts-martial, Barker and Cortez testified they took turns raping the girl while Green shot and killed her mother, father and younger sister. Green shot the girl in the head after raping her, they said.
The girl's body was set on fire with kerosene to destroy the evidence, according to previous testimony.