SAN FRANCISCO (CBS SF) — Over the next five years, inmates can expect to see vending machines that dispense free condoms inside all California prisons, thanks to a controversial new law which makes condom-distribution a requirement in state correctional facilities.

Handing out free condoms behind bars isn’t an entirely new practice in the Golden State. San Francisco County Jail began providing them in the 1980s. Now San Francisco’s program is being held up as a model for the entire state.

READ MORE: No Rain In Forecast; Dry January Returns San Francisco To Parched Conditions

“The prevalence of HIV and AIDS and hepatitis and STDs is higher in county jails but we have contained it for some years and we’re starting to see the population [of infected inmates] go down,” said San Francisco Sheriff Ross Mirkarimi. He says this law should have been passed years ago.

“In California, it’s long overdue. For the United States, it’s way long overdue.”

Not all the inmates we spoke with agreed.

“I’m definitely not comfortable with it being here,” one told us. Another said, “I don’t believe there’s any way we should have a reason to access it.”

READ MORE: One Dead In Crash, Fire Involving Big-Rig On Eastbound Richmond-San Rafael Bridge

Perhaps that’s because of an older law which prohibits inmates from having sex with each other — even when it’s consensual.

“I think we have to be very careful about sending mixed messages about what is permissible and acceptable behavior,” said S.F. Sheriff’s Department chief Matt Freeman.

The reality is — as one inmate admitted — people do have sexual intercourse in prison. And, legal or not, many inmates say it is better to acknowledge that reality instead of ignoring it.

According to the Center for Disease Control, one person in seven who is infected with HIV passes through a correctional facility each year. In California, more than a thousand prisoners are known to be HIV-positive.

Sheriff Mirkarimi says this new law will address a bigger issue, “making sure that people see that improving public safety is also about improving public health.”

MORE NEWS: COVID: Marin County Begins Easing Rules As Omicron Surge Likely Peaking

California is the second state to adopt such a law. Vermont started offering condoms to prisoners in the 1980s.