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: Goldstein Investigates: Scammers Going Old School In Attempt To Defraud EDD

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: Firefighters Battle Pacific Palisades Brush Fire

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: Competition Rises For Wedding Venue Bookings As Couples Look To Tie The Knot Post-Pandemic

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