SACRAMENTO (AP) — California lawmakers advanced a proposal Monday that would require all single-stall public restrooms to be gender neutral.

The vote came hours after North Carolina’s governor sued the federal government to defend a law in that state 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. He said it aims to help transgender people, parents with kids of different genders and adults caring for aging parents.

At least three states have considered proposals in the past two years to open single-occupancy stalls to anyone as state and local governments address gender issues. Ting’s office says California’s proposal is the most comprehensive taken up so far.

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 California Assembly also advanced to the Senate a proposal to ban publicly funded, nonessential travel to states with laws restricting the rights of gay or transgender people. That bill and Ting’s lavatory legislation now move to the state Senate for consideration. If passed, they would go to Gov. Jerry Brown, a Democrat, for final approval.

Brown 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 records.

In New York, lawmakers are considering a bill similar to California’s restroom proposal that would apply only to government facilities. Legislation to establish gender-neutral restrooms in new and remodeled government buildings stalled in the Vermont General Assembly a year ago.

Washington, D.C., has required single-person toilet rooms to be labeled “restroom” or have some other gender-neutral sign since 2006.

In the North Carolina case, 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.

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)