When Eli Erlick was 8 years old, she would sometimes pretend to be sick, just so she could leave school and go home to use the bathroom. She had asked to use the girls’ bathroom at her school in Mendocino County, California, but she wasn’t allowed to.

“I had no idea why I couldn’t do this,” Erlick said. “I didn’t even know the word ‘transgender.’ I just knew that I was a girl,” she said, and so it didn’t feel right to use the boys’ bathroom. This continued until she was 13, when she began her gender transition.

Erlick, now 19, is a second-year student at Pitzer College near Los Angeles and director of Trans Student Education Resources (TSER), a student-led advocacy group. When she was a senior in high school, she worked to help craft California’s School Success and Opportunity Act, a 2013 law — the first of its kind in the nation — that requires the state’s public schools to allow trans students to use the bathrooms and play on the sports teams that correspond with their gender identities.

After that landmark legislation in California, some states are pushing in the other direction, and bathrooms and locker rooms are starting to become key battlegrounds in the nationwide fight for the rights of transgender children.

“My story isn’t uncommon at all,” Erlick said. “There are thousands of trans youth who are being denied these resources every day.”

This month, lawmakers in three states have proposed legislation that would limit transgender children from using facilities that correspond to their gender identities. Nevada Assemblywoman Victoria Dooling, a Republican, proposed a bill on March 19 that would require kids at public schools to use the restrooms and showers that correspond to their biological sex at birth. Republican lawmakers in Minnesota put forth two bills in March that would require schoolchildren to use bathrooms and participate on the sports teams that match their gender at birth, and the Kentucky State Senate approved a similar bill.

The Williams Institute at UCLA School of Law, a think tank that researches sexual orientation and gender identity, released a study in 2013 about the effects of denying access to certain bathrooms on transgender individuals. The study found that nearly 60 percent of the transgender people it surveyed said they had avoided going out in public because of worries about safe access to public restrooms, and 54 percent said they had physical problems like dehydration or kidney infections from trying to avoid using public bathrooms.

These proposed laws do offer some compromises: The Minnesota bill says schools would be required to provide “places of public accommodation on the grounds of gender identity or expression.” But advocates say that these laws are a clear signal that transgender children are not welcome in common spaces. Opponents of the Kentucky legislation call it the “bathroom bully” bill because they say it would open the door for children to judge each other based on perceived gender identity.

Other recent laws go even further. Lawmakers in Florida proposed a bill in February that applies to any sex-segregated public facility, not just in public schools, and calls for a $1,000 fine for violators and a potential prison term of up to a year. A bill introduced in the Texas legislature in February would bar someone from entering a locker room or bathroom meant for women if that person has a Y chromosome. Violating the law would be a felony, and attendants who repeatedly allow trans people to enter could be charged with a felony and do jail time, according to the bill’s text.

Texas State Rep. Debbie Riddle, a Republican, wrote in a Facebook post in January that the new bill “will protect women & children from going into a ladies restroom & finding a man who feels like he is a woman that day.”

Advocates for transgender rights say the increased visibility of transgender people in American culture in recent years is triggering this legislative backlash, particularly in states, such as Nevada, that have already passed laws that protect transgender students or employees from gender discrimination.

“It’s a second bite of the apple for lawmakers who are not happy that their states or entities within their states had moved to protect students,” said Michael Silverman, executive director of the New York City-based Transgender Legal Defense and Education Fund.

If these proposed bathroom bills do get signed into law, they are likely to face legal challenges. Gender identity and expression is included in Title IX of the Education Amendments Act, a 1972 law that protects all public school students from gender discrimination. “The Departments of Justice and Education have made it clear that they intend to protect transgender students from unequal treatment in school,” Silverman said.

At least two recent lawsuits have already successfully upheld access to bathrooms for transgender children. In 2013, the family of Coy Mathis, a transgender first-grader, won a lawsuit against their Colorado school district that allowed her to use the girls’ bathroom. In 2014, Maine's highest court ruled in favor of transgender student Nicole Maines after she sued when her high school required her to use a separate restroom for staff.

“Transgender people are probably 20 years behind lesbian and gay people in terms of public understanding of who they are and public acceptance,” Silverman said. “That makes the transgender community an easy scapegoat now for people who no longer target the gay and lesbian community because it won’t be tolerated. We need to create the conditions where legislators know that they cannot target transgender people either.”