California Gov. Jerry Brown signed a controversial bill into law Monday afternoon allowing the state’s transgender public school students to choose which bathrooms they use and whether they participate in boy or girl sports.

The law would cover the state’s 6.2 million elementary and high school kids in public schools.

Supporters say the law will help cut down on bullying against transgender students, The families of transgender students have been waging local battles with school districts around the country over what restrooms and locker rooms their children can use.

"Now, every transgender student in California will be able to get up in the morning knowing that when they go to school as their authentic self they will have the same fair chance at success as their classmates,” Masen Davis, Executive Director of Transgender Law Center said.

Daily politics news delivered to your inbox: sign up for our newsletter

While California is the first state to pass a law of this magnitude, Massachusetts, Connecticut, Washington and Colorado have all adopted policies designed to protect transgendered pupils.

Not everyone is on board.

Opponents of the bill say allowing students of one gender to use facilities intended for the other could invade the other students' privacy.

Randy Thomasson, of savecalifornia.com, says the law would “damage” kids.

"This radical bill warps the gender expectations of children by forcing all California public schools to permit biological boys in girls restrooms, showers, clubs and on girls sports teams and biological girls in boys restrooms, showers, clubs and sports teams," Thomasson said. "This is insanity."

The California bill, which was backed by a coalition of organizations including Transgender Law Center, Gay-Straight Alliance Network, Gender Spectrum, Equality California, ACLU of California, National Center for Lesbian Rights and statewide teacher and parent organizations.

The Associated Press contributed to this report.