The California state Senate Wednesday approved a groundbreaking bill expanding antidiscrimination protections for transgender students in public elementary and secondary schools, among other things allowing them to choose sports teams and restrooms based on their gender identity.

The bill has already been passed by the state Assembly, so it now goes to Gov. Jerry Brown for his signature, the Associated Press reports. A spokesman for Brown said the governor would not comment on the measure.

“We’re thrilled that the Senate has passed this important legislation, and we are hopeful that the governor will sign it into law,” said Ilona Turner, legal director for the Transgender Law Center, in a press release. “Without this law, California schools that are failing to respect transgender students will inevitably face lawsuits like the ones we’re already seeing in other states, at great financial and emotional cost both to those students and to the state as a whole. This law will make sure that all students have an equal and safe opportunity to learn.”

State law already banned discrimination within schools on the basis of gender identity, but this bill spells out protections in greater detail. The California measure is the first putting such language into statute, the AP notes.

Opponents of the bill said it would create “some very difficult situations” for students, as Republican senator Jim Nielsen put it. Supporters, however, pointed out that some large California school districts, including Los Angeles, already have similar policies, and there have been no problems with them.

“To date there’s been no single reported incident of any misconduct,” said Democratic senator Ricardo Lara, a coauthor of the bill. “Let’s not confuse silly behavior issues with sensitive gender identity issues.”