SACRAMENTO, Calif. – Shortly after 2 a.m. on April 6, 2010, a guard at Salinas Valley State Prison noticed Alan Ager's cellmate trying to stuff something under a mattress. It was Ager, blood trickling from his mouth and a cloth noose tied around his neck.
The convicted child molester died 10 days later without regaining consciousness, his death earning his cellmate a second life sentence.
California state prisoners are killed at a rate that is double the national average -- and sex offenders like Ager account for a disproportionate number of victims, according to an Associated Press analysis of corrections records.
Male sex offenders made up about 15 percent of the prison population but accounted for nearly 30 percent of homicide victims, the AP found in cataloging all 78 killings that corrections officials reported since 2007, when they started releasing slain inmates' identities and crimes.
The deaths -- 23 out of 78 -- come despite the state's creation more than a decade ago of special housing units designed to protect the most vulnerable inmates, including sex offenders, often marked men behind bars because of the nature of their crimes.
In some cases, they have been killed among the general prison population and, in others, within the special units by violence-prone cellmates. Officials acknowledge that those units, which also house inmates trying to quit gangs, have spawned their own gangs.
Corrections officials blamed a rise in the prison homicide rate on an overhaul meant to reduce crowding. As part of the effort, the state in 2011 began keeping lower-level offenders in county lockups, leaving prisons with a higher percentage of sex offenders and violent gang members.
Violence and homicides won't decline unless the state goes well below the prison population level set by the courts -- 137.5 percent of the system's designed capacity, said James Austin, president of the JFA Institute, a Washington, D.C., consulting firm that works on prison issues.
"Until the state gets its prison population below 100 percent of capacity, you're going to have this," he said.
Overall, 162 California prisoners were killed from 2001 to 2012, or 8 per 100,000 prisoners -- double the national average over the same time period and far higher than that of other large states, including Texas, New York and Illinois, according to federal statistics.
Officials in Oklahoma mainly blamed gang violence for giving that state the nation's highest long-term prison homicide rate, 14 per 100,000, although a quarter of its inmate homicide victims in the last decade had convictions for sex crimes.
In California, from 2012 to 2013, the most recent years for which data were available, the rate rose to 15 per 100,000, according to a report by a federal court receiver, though corrections officials said the number of deaths dropped last year.
Department spokeswoman Terry Thornton would not comment on the possible reasons for California's long-term trend of inmate homicides.
The problem is most acute with sex offenders. Last fall, the corrections department's inspector general reported that so many homicides occurred in the "increasingly violent" special housing units reserved for vulnerable inmates that the department could no longer assume that inmates there could peacefully co-exist.
The report looked at 11 homicide cases that were closed in the first half of 2014 and found that 10 victims were sensitive-needs inmates. Using corrections records, the AP found that eight of them were sex offenders.
The inspector general recommended the reinstatement of a policy dropped 15 years ago that required potential sensitive-needs cellmates to fill out a compatibility form before they are housed together and that inmates with a history of violence toward cellmates should be housed alone.
Thornton said the report led to an ongoing review of the policy of housing most prisoners, including vulnerable inmates, two to a cell.
Experts said the state could better protect sex offender inmates by separating them into their own facilities. Prison gangs, though made up of inmates often convicted of heinous crimes themselves, have long made it a practice to target sex offenders.
"They're going to clean up anybody on that yard with `hot charges,"' said former inmate Todd Siefert, referring to any crime against a woman or child, including a sex offense. The very lowest rung is reserved for child molesters.
Seifert said he was confronted by white supremacist inmates less than a half-hour after he arrived at the California Institution for Men in Chino in 2004 and was severely beaten by a half-dozen fellow inmates for his sex crime involving a woman.
Corrections department spokesmen in Illinois, New York and Texas said the targeting of sex offenders is not considered a problem there. Some states have stricter protocols for keeping sex offenders away from other inmates.
Those participating in Maine's rehabilitation therapy program are housed separately, and none has been injured or killed in the decade it has been in existence, said Dennis McNamara, executive director of the Counseling and Psychotherapy Center Inc., which runs the program.
However, only about 11 percent of the state's inmate sex offender population is in the treatment program, corrections spokesman Scott Fish said in an email. Of four Maine inmates killed behind bars since 2001, two were sex offenders.
In Massachusetts, state policy calls for sex offenders to be placed in a "therapeutic community" that offers intensive treatment aimed at changing their behavior, preventing relapses and preparing them for eventual release.
The state had a high-profile inmate homicide in 2003, when John Geoghan, a former Roman Catholic priest whose sexual abuse conviction sparked a widespread abuse scandal in the Catholic Church, was killed by a fellow inmate who claimed he was chosen by God to kill pedophiles.
Adding to the problem in California, the department identified nearly 100 gangs that formed in sensitive-needs units, said Matthew Buechner, a special investigator who trained other corrections officials on problems with prison gangs until he retired last fall.
In Ager's case, the 5-foot-4, 135-pound inmate was kept in special housing when he first entered the prison system at San Quentin. But he was housed with general-population inmates soon after his transfer to Salinas Valley because officials there decided he didn't need extra protection.
Ager, 63, was housed with Clyde Leroy Beaver, a convicted murderer who has spent the last four decades in prison. Beaver pleaded guilty to murder in Ager's slaying and got another life sentence that Ager's son considers essentially meaningless.
A federal judge ruled in March that Ager's family failed to show that prison officials acted with deliberate indifference.
"The very day they let him into the yard, he was filing complaints, `Get me the hell out of here,"' said Ager's son, Daniel. "'This is not safe. I'm going to get killed out here."'