Photo: Sara D. Davis/Getty Images

On Thursday, California Governor Jerry Brown signed a law requiring that all single-occupancy restrooms in public buildings be open to people of any gender, the Los Angeles Times reports.

The bill’s sponsor, State Assemblyman Phil Ting of San Francisco, said the state was “charting a new course for equality” and that restricting single-user restrooms by gender “defies common sense and disproportionately burdens the LGBT community, women, and parents or caretakers of dependents of the opposite gender.”

The bill came in response to new legislative efforts in other states, most infamously North Carolina, restricting the rights of transgender people to use restrooms that match their gender identity. The Justice Department announced that it was suing North Carolina for federal civil rights violations over its bathroom law on the same day the California assembly passed Ting’s bill by a wide margin.

Speaking to Time, the assemblyman downplayed the social justice angle of the law, saying, “it’s ultimately a matter of convenience for the largest number of people,” and stressing that it will also help parents and caretakers — not to mention women in general.

Ting also said that while some social conservatives objected to the bill, the main point of contention was that “men don’t seem to be able to use the bathroom without making a mess.”

Transgender advocates applauded the law’s signing. Kris Hayashi, executive director of the Transgender Law Center, told NBC it was a matter of safety, as transgender people are at high risk of experiencing threats, harassment, or violence when using restrooms that do not correspond to their correct gender.