SACRAMENTO (CBS / 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: Puppy Stolen From Vehicle In San Francisco; Suspect Refuses To Cooperate

But Stainer said 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: Bay Area COVID-19 Roundup: Crimes Linked To Lockdown-Violating Underground Gatherings; Santa Clara Relaxes Outdoor Gathering Rules

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: Los Altos Hills Man Arrested For Child Porn Possession, Distribution

(Copyright 2013 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)