SAN FRANCISCO (AP) — A California lawmaker has introduced legislation aimed at guaranteeing transgender students the right to use public school restrooms and participate on the sports teams that correspond with their expressed genders.

The bill reflects the accommodations that a number of U.S. schools are being asked to make as Americans start identifying as transgender at younger ages.

If approved by the Legislature and signed by Gov. Jerry Brown, Assemblyman Tom Ammiano's AB1266 would give young people the right "to participate in sex-segregated programs, activities and facilities" regardless of what gender is listed on their school records.

The measure was introduced last week by Ammiano, D-San Francisco.

The Capitol Resource Institute, a Sacramento-based group that lobbies for religious conservatives, highlighted Ammiano's bill in a newsletter sent to its members on Friday, promising to fight the legislation on behalf of students who might "object to sharing bathrooms, showers, and locker rooms with students of the opposite sex."

The Massachusetts Department of Elementary and Secondary Education issued a policy last week granting the same protections, but Ammiano's bill is believed to be the first to explicitly spell them out as a matter of state law, Transgender Law Center executive director Masen Davis said.

Discriminating against transgender people already is illegal in California and at least 14 other states, but supporters say the law Ammiano introduced is necessary to ensure that school districts do not deny students opportunities to participate in activities or to feel welcome on campus.

"We would strongly argue that our nondiscrimination laws would already establish that transgender students should have access to facilities and activities that reflect their gender identity or gender expression, but because they don't go into that level of detail, it's important to clarify this right," Davis said.

The matter of how educators respond to the needs of transgender youngsters was highlighted last week when a Colorado family went public with their experience being told that their first-grader, who was born a boy, could not use the girl's bathroom at her elementary school, and would instead have to use the facilities in the nurse's office or the teachers lounge.

The family has filed a complaint with the state's civil rights office, claiming the school's decision violated Colorado's nondiscrimination laws.

Devon, a 19-year-old Northern California resident who did not want her last name used because not all her work colleagues and acquaintances know she is transgender, recalled struggling with similar restrictions when she started middle school. Because she had lived as a boy until then and her enrollment forms still listed her as male, she was required to attend boys' physical education classes.

"I felt very humiliated and very ashamed to be excluded from all the other girls," she said. "I would even be wearing the girls' gym clothes, and the boys would be very confused why this girl would be forced to be on their team."

Ilona Turner, the Transgender Law Center's legal director, said her office fields several calls a month from parents whose children have been instructed to use locker rooms, bathrooms and gym attire that do not conform to the gender to which the child relates.

While assigning students to use adult restrooms might seem like a good compromise, "that itself leads to more problems for the kids we hear from," Turner said.

"Those facilities are often inconveniently located, so students end up getting a bunch of tardies, and it outs them as different every time they have to use those different facilities," she said.

Karen England, executive director of the Capitol Resource Institute, said her group would fight the legislation, which she called "extreme" and "dangerous."

"This is really a rare thing, so to make this drastic, radical mandate on the schools for an extremely rare situation is just hijacking the school system," England said.