A new law signed by California Gov. Gavin Newsom on Saturday requires the state to house transgender inmates in prisons based on their gender identity.

The California Department of Corrections and Rehabilitation houses men and women in separate facilities, and transgender inmates often are housed based on their biological sex. Advocates have argued that this is dangerous, particularly for transgender women housed in male facilities.

Gov. Gavin Newsom holds a face mask as he urges people to wear them to fight the spread of the coronavirus during a news conference in Rancho Cordova, Calif.  (AP)

The law says officers must ask inmates privately during the intake process if they identify as transgender, nonbinary or intersex. Those inmates can then request placement in a facility that houses either men or women.

The California Department of Corrections and Rehabilitation cannot deny requests solely because of inmates' anatomy, sexual orientation or "a factor present" among other inmates at the facility, the law says.

WILDFIRE ERUPTS IN CALIFORNIA’S NAPA COUNTY, EMERGENCY EVACUATIONS OVER ‘DANGEROUS RATE OF SPREAD’

Requests can be denied, however, because of a "management or security concerns." If a request is denied, the state must give the inmate a "meaningful opportunity" to object. If inmates raise concerns about their health or safety, the law says the state must reassess.

CLICK HERE TO GET THE FOX NEWS APP

The law also requires officers to address transgender inmates based on the pronouns of their choice. And it requires officers to search inmates based on the search policy of their gender identity.

The Associated Press contributed to this report.