California lawmakers passed a proposal Monday that would require all single-person public restrooms to be gender neutral, hours after North Carolina's governor sued the federal government to defend that state's law requiring transgender people to use the restroom matching the sex on their birth certificate.

Members of the California Assembly voted 52-18 on an initial ballot in favor of the proposal from Democratic Assemblyman Phil Ting of San Francisco, who says it aims to help transgender people, parents with kids of different genders and adults caring for aging parents.

His proposal would apply to all businesses in California as well as state and local government buildings, asking inspectors and officials who enforce building code to check restroom signs for compliance. A state association of health officers rescinded its opposition to the bill after Ting removed them from that list.

"California is a place of inclusion," Assemblyman Evan Low, D-Campbell, said in support of the proposal. "Let's make a clear statement that, if you want to go pee, by all means help yourself."

Assemblyman David Chiu, D-San Francisco, said he was co-authoring the legislation on behalf of "thousands of transgender individuals in the state of California who feel unsafe in bathrooms, who feel harassed in bathrooms, who are questioned when they walk into a bathroom."

Republican Assemblyman James Gallagher of Plumas Lake opposed the proposal, saying men's messy habits will inconvenience many more people than the bill would help. He said the bill applies too broadly.

The U.S. Department of Labor's Occupational Safety and Health Administration has long considered restroom access a safety issue and in June 2015 named gender-neutral stalls a best business practice.

The legislation now moves to the state Senate, where it must pass before going to Gov. Jerry Brown.

The Democratic governor signed a separate bill in 2013, allowing public school students to participate in sports and use restrooms of their gender identity, regardless of their sex listed on school record.

In the North Carolina, the Justice Department responded to Gov. Pat McCrory's lawsuit by suing the state, seeking a court order declaring the law discriminatory and unenforceable.

U.S. Attorney General Loretta Lynch said Monday the state's law requiring transgender people to use the public restroom corresponding to the gender on their birth certificate amounts to "state-sponsored discrimination" aimed at "a problem that doesn't exist."

Billions in state aid for North Carolina are at stake in that dispute, which has triggered boycotts and cancellations aimed at getting the state to repeal the measure.