California Governor Jerry Brown gestures during a news conference at Memoria y Tolerancia museum in Mexico City July 28, 2014. REUTERS/Edgard Garrido

(Reuters) - California Governor Jerry Brown signed a bill that bans prisons from sterilizing inmates without their consent, his office said on Thursday, after media reports and a later audit showed officials failed to obtain consent from dozens of incarcerated women.

The bill prohibits sterilizations of inmates as a means of birth control in correctional facilities except for when a patient’s life is in danger or when there is a medical need and no less drastic alternatives are available.

The bill passed both the state’s assembly and senate chambers unanimously last month.

“Pressuring a vulnerable population into making permanent reproductive choices without informed consent is unacceptable, and violates our most basic human rights,” said the bill’s author, state Senator Hannah-Beth Jackson, in a statement.

The measure was introduced earlier this year in the wake of allegations, first highlighted by the non-profit Center for Investigative Reporting, that the state failed to obtain informed consent from some female inmates who had their fallopian tubes tied.

An audit released in June showed that errors were made in getting proper consent from 39 women inmates out of 144 who underwent the procedure while incarcerated between 2005 and 2011.

Prison rules make the procedure, known as tubal ligation, available to inmates as part of regular obstetrical care. But until the issue was broached in 2010 by an inmates’ rights group, proper authorization was rarely obtained, the state auditor’s report said.

The audit was a blow to the state’s troubled prison system and came as California struggles to meet court-ordered demands to improve medical and mental healthcare in its overcrowded prisons.

Medical care in California’s prisons has been under the supervision of a federally appointed receiver since 2006.