ELI ERLICK was born male but decided at the age of eight that she was a girl. She loved her school gym class, but after three years her teachers forced her to join a team of boys; humiliated, she dropped out. Her grades suffered, she lost friends and she refused to go out during breaks.

Eli has just graduated from high school in northern California. The next generation of transgender schoolchildren may have a better time. Under a law passed this week, from January they will be allowed to use toilets and join sports teams according to the gender they identify with rather than the sex on their birth certificate. The law’s backers say it merely clarifies existing protections. Even so, it is the first such statewide statute in America, although a handful of other states have similar policies.

Sceptics say policies should be left to individual districts or schools. Some fret about awkward shower-room encounters (although the law says nothing about that). Others fear that boys who join girls’ sports teams will have an unfair advantage. But several school districts, including Los Angeles, have operated similar policies for years without a hitch. “It’s been a problem-solver rather than a problem-causer,” says Judy Chiasson, a schools official. Teachers back the law.

Data on the transgender population are scarce; the Census Bureau does not ask about gender identity, and definitions are inconsistent. What numbers there are suggest that anything between 0.1% and 0.7% of Americans have a gender identification that differs in some way from their sex at birth. That could mean there are 30,000 transgender children in California’s public schools, although not all will take advantage of the new law.

Reports paint a grim picture of life for the transgendered; they are likelier to be unemployed, live in poverty or to attempt suicide than other Americans. Yet attitudes are changing quickly, says Norman Spack, a paediatric endocrinologist whose Boston clinic has treated around 170 transgender pubescent children since 2007. Similar facilities are opening across the country. California’s law follows a string of pro-transgender legal rulings, such as the case of a six-year-old in Colorado who identifies as female but was denied access to girls’ toilets at school.

Some children that young may see their transgender identity fade, says Dr Spack. But those beginning puberty who reject their physical sex do not change their minds. California’s law, and more that may follow, should make their lives a little easier.