New Jersey Governor Chris Christie on Friday signed a bill that allows transgender students to use the bathroom and locker room of their choice.

The Democrat-sponsored legislation takes effect immediately.

Under the legislation, schools cannot force transgender students to use facilities that conflict with their gender identity and faculty and staff must address transgender students by the name and pronoun they prefer.

Assemblywoman Valerie Vainieri Huttle, a Democrat from Bergen and a co-sponsor of the legislation, said: “These guidelines are needed to ensure that transgender students can safely be themselves without fear of being persecuted, and can help promote a culture of understanding and acceptance that will hopefully influence how students treat each other in and outside of school.”

The bill was a response to President Donald Trump's decision to rescind federal guidelines that instructed schools to allow transgender students to use the bathroom of their choice.

Christie, a Republican, did not explain his decision to sign the bill.

Christie and Democrats, who control the House and Senate, have previously clashed on other bills related to LGBT rights, including Christie's refusal in 2012 to sign a bill approved by lawmakers that would have extended marriage rights to gay and lesbian couples.