Contra Costa County Judge Barbara Zuniga gave the longer sentence to Jose Montano, 22, and the shorter term to Marcelles Peter, 20, because Peter was a minor at the time of the crime.
"I cannot overlook that," Zuniga said of Peter's age.
The victim, a sophomore known in court only as Jane Doe, did not attend the sentencing, but her dramatic testimony during the trial, the first in the case that involves six different defendants, helped lead to the men's convictions last month for the 2009 attack outside a homecoming dance at Richmond High School.
Authorities said the girl was beaten, robbed and sexually abused by numerous men over two hours while as many as 20 people watched. Police discovered her heavily intoxicated, partially nude and unconscious under a picnic table.
"It's beyond shocking that a human being can be dehumanized to the extent that Jane Doe was that night," the judge said at Thursday's sentencing, according to the Contra Costa Times. "She stopped being a human being to you. She became a thing for you to torture and play with."
A jury found Montano and Peter guilty of forcible rape, sexual penetration and forced oral copulation.
Both men had been eligible for the maximum sentence of 33 years to life that Montano received.
Two defendants had already taken plea deals in the case. Ari Morales was sentenced to 27 years in prison, Manuel Ortega to 30 years.
The final two defendants, John Crane and Elvis Torrentes, were awaiting trial on lesser sexual assault charges.
The victim received $4 million to settle a lawsuit against the West Contra Costa Unified School District in 2010.