(CNN) -- California has become the first state in the nation to allow transgendered students to choose which school bathrooms and locker rooms to use and which sport teams to join based on their gender identity.
Gov. Jerry Brown signed Assembly Bill No. 1266 into law Monday. The law will go in to effect January 1.
The law is the nation's first that specifically requires equal access to public school facilities and activities based on gender identity, though some states have general policies to the same effect, said Shannon Price Minter, legal director of the National Center for Lesbian Rights -- one of several groups backing the legislation.
Devon Marchant, a transgender nursing student at Folsom Lake Community College, applauded the new law.
"I mentor families across the nation, and I believe this will give them the opportunity to participate in extracurricular activities or sports without fear of discrimination or prejudice against transgender people," Marchant told CNN affiliate KCRA.
Some parents opposed it.
"Just because they're confused doesn't mean they have to confuse everybody else," Maria Garcia told CNN affiliate KXTV.
Jordan Borja, a senior at Tokay High School in Lodi, had mixed feelings.
"I would feel uncomfortable if somebody was to walk in the bathroom and they'd be transgender," she told KXTV. "I mean, I'm not against it, but I'd feel really uncomfortable about it."
But some said the law reflects the times.
"Times are changing, and it's not going to get any different," parent Pam Judson told KXTV. "Other things are going to come up in the future that people aren't going to be happy with. But, you know, life is changing."
Though California had already prohibited discrimination in education, transgender students were often "unfairly excluded from physical education, athletic teams, and other school activities and facilities because of who they are," according to a statement by the National Center for Lesbian Rights and other groups supporting the measure.
A heated debate
The California Senate approved the proposal on Wednesday in a 21-9 vote.
But state Senate Republicans largely opposed the measure during debate.
"There are youthful sex offenders," state Sen. Jim Nielsen said. "I guarantee there would be those who would use this opportunity."
Another Republican, state Sen. Jean Fuller, expressed concerns about implementation.
Ashton Lee, a 16-year-old transgender boy from of Manteca, California, testified before the Senate Education Committee last month. Lee wants to play high school football.
"I just want to be treated the same as all the other boys, but my school forces me to take P.E. in a class of all girls and live as someone I'm not," Lee said in a statement. "I can't learn and succeed when every day in that class leaves me feeling isolated and alone."
CNN's Michael Martinez contributed to this report.