SACRAMENTO — Forget the men’s room and the women’s room. Gender will no longer matter when using single-stall public bathrooms in California.

Gov. Jerry Brown on Thursday signed legislation that will require restrooms for single users to be designated all-gender, California’s latest move to bolster transgender rights even as much of the country moves in the opposite direction.

“California is charting a new course for equality,” said Assemblyman Phil Ting, D-San Francisco. “Restricting access to 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.”

In signing Assembly Bill 1732, Brown vindicated activists who have made the right to use bathrooms matching their gender identities a new front in LGBT politics.

California has continued down that path even as elected officials in other states, notably North Carolina, have moved to block transgender people from using the bathroom they are most comfortable using.

“We now have a policy that gives everyone greater privacy and safety in public restrooms. It — and not hateful laws in North Carolina, Mississippi and elsewhere — should be the model for the nation,” Equality California Executive Director Rick Zbur said in a statement.

In 2013, Brown signed a bill allowing high school students to use the bathrooms and join sports teams that align with their gender identity. Earlier this week, he authorized legislation banning official state travel to states that discriminate against LGBT people.

Pointing to the widespread discrimination and disproportionate risk of violence transgender people face, California legislators signed a pledge this year committing them to safeguarding the rights of transgender people.

Brown on Thursday also signed a bill that will enroll nearly 7 million California workers automatically in a retirement savings account in an attempt to address growing fears that many workers will be financially unprepared to retire. The legislation, SB 1234 by Senate President Pro Tem Kevin de León, D-Los Angeles, creates a state-run retirement program for workers who don’t have an employer-sponsored plan, many of them working in lower-wage positions. It requires employers to automatically enroll their workers and deduct money from each paycheck, though workers can opt out or set their own savings rate. The account could also be carried from job to job.

The governor on Thursday also signed SB 1263, which makes it more difficult to create small water agencies. Roughly 63 percent of water districts and companies in California have fewer than 200 connections. And during the drought, many — including the Lompico Water District in the Santa Cruz Mountains — struggled to maintain supplies, given their aging equipment and limited ability to raise money.

The measure by Sen. Bob Wieckowsi, D-Fremont, requires that anyone proposing to set up a new water agency or private water company must first identify other water agencies within three miles, then meet with those agencies and write a report comparing how much it would cost residents to simply connect to the existing, larger water system rather than creating a new one. Every new system also would need a permit from the State Water Resources Control Board in Sacramento.

“Too many of the more than 7,600 water systems in California lack the expertise and financial resources to effectively and safely provide service to their customers,” Wieckowski said on Thursday. “This bill increases state oversight and will prevent these districts from forming in the first place if a larger, neighboring system can better provide the service.”

In other actions Thursday, Brown: