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:

Approved several voting-related bills, including legislation that lays the groundwork for more California counties to conduct elections entirely through mail-in ballots. Brown signed SB 450, which allows 18 counties to set up vote centers where people could drop off mail-in ballots in the 10 days before the 2018 election. The rest could move to the system in 2020. Lawmakers say the current voting system is outdated. The Democratic governor also approved legislation to let voters designate anyone to turn in their ballots, and to let voters take and share photographs of their ballots on social media starting next year. But Brown vetoed a bill requiring counties to notify voters if their vote-by-mail ballot was not counted, saying counties already publish that information online.

Signed a bill that prevents California police from prematurely selling criminals’ belongings. California law already requires that someone be convicted before police can seize cash or property valued under $25,000 that’s believed to have been attained illegally. Democratic Sen. Holly Mitchell, of Los Angeles, says police work around that law by partnering with federal agencies to seize assets before convictions, reaping millions of dollars. The bill signed by Brown, Mitchell’s SB 443, prohibits law enforcement agencies from profiting off those partnerships in cases of suspected drug activity. It also increases the ceiling for other crimes to $40,000.

Staff writer Paul Rogers, the Sacramento Bee and The Associated Press contributed to this report.

Otto Warmbier was arrested in January 2016 at the end of a brief tourist visit to North Korea. He had been medically evacuated and was being treated at the University of Cincinnati Medical Center when he died at age 22.