SACRAMENTO (AP) — California prison officials have confirmed that inmates can get married to someone of the same sex under certain conditions.

Michael Stainer, director of the adult institutions division for the Department of Corrections and Rehabilitation, issued a memo on Friday stating that the U.S. Supreme Court decision that made same-sex marriages legal again in the state in June also applies to prisoners.

READ MORE: Davis' 28 Lead Kings To 2nd Straight Win Over Clippers

But Stainer says gay or bisexual inmates will only be allowed to marry same-sex partners who are not incarcerated and only during prison ceremonies. He says marriages between two prisoners would raise too many security concerns.

READ MORE: Family Of 18-Year-Old Garret Hayward, Killed By Suspected DUI Driver, Hold Emotional Vigil

Assemblyman Tom Ammiano said Monday that Steiner’s directive was prompted by an inquiry from his office.

In 2007, California became the first state to allow conjugal visits and overnight stays for inmates with same-sex domestic partners.

MORE NEWS: In Wake Of Recent Crime Uptick, Beverly Hills Hires More Officers And Increases Patrols

(© Copyright 2013 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)