Lawmakers in 16 states have filed two dozen bills this year to scale back legal protections for transgender people or restrict their ability to use bathrooms that match their gender identity. Many are patterned after a North Carolina law that was repealed Thursday after it sparked a national uproar and reportedly cost the state billions in lost business.

The bills are being closely tracked by transgender advocacy groups in the wake of the Trump administration decision to rescind federal guidance on the civil rights of transgender students concerning bathroom access and other matters. The administration said that states — not the federal government — should decide how schools accommodate transgender students.

“This is an issue best solved at the state and local level. Schools, communities, and families can find — and in many cases have found — solutions that protect all students,” Education Secretary Betsy DeVos said after she and Attorney General Jeff Sessions revoked the Obama-era directive that transgender students should be allowed to use bathrooms aligned with their gender identity.

After facing intense economic pressure — losing $3.67 billion in business, according to one analysis — legislators in North Carolina on Thursday voted to repeal H.B. 2, a law that requires people to use public bathrooms according to the sex on their birth certificate and reversed certain other LGBTQ protections passed by local government. Gov. Roy Cooper (D) signed the repeal measure soon afterward.

But LGBTQ advocates are unhappy with the bill that replaced it, which bars localities from enacting nondiscrimination ordinances. The NCAA, which pulled championship games from the state to protest the passage of H.B. 2, had threatened to continue its boycott if the law was not repealed.

Mara Keisling, executive director of the National Center for Transgender Equality, said deferring to states on these issues “is simply and dangerously wrong and incorrect.” She said that Title IX, the federal law that bars sex discrimination in schools, gives transgender students access to the bathrooms that match their gender identity and that the federal government should enforce that position.

“Enforcing federal laws like Title IX and other civil rights laws are not state-by-state options. They are the responsibility of the federal government,” Keisling said.

Fifteen states have laws providing explicit protections for transgender students, according to the Human Rights Campaign.

But lawmakers in numerous states have sought to turn back protections or to restrict bathroom access. The bills have been filed largely in midwestern and southern states, including Alabama, Arkansas, Illinois, Kansas, Kentucky, Minnesota, Missouri, Oklahoma, South Carolina and Texas, according to the ACLU, which tracks the legislation.

They ensure that the debate over whether transgender people — and schoolchildren in particular — should be able to use the bathrooms that align with their gender identity will remain at the forefront of the fight over LGBT rights.

Proponents of the bills say requiring people to use bathrooms corresponding to the sex on their birth certificate is necessary to safeguard privacy and traditional values, particularly in public schools. But transgender students and their parents argue that being forced out of bathrooms that align with their gender identity is discriminatory and a violation of their civil rights. Using bathrooms that align with their gender identity, they say, is an important step in their transition.

Many of the bills would restrict access to public bathrooms — including those in schools — using as the standard for access the sex listed on a person’s birth certificate. Some propose penalties — including fines and court actions — for schools that do not enforce the restrictions. A bill in Washington state would explicitly permit public and private entities to create those restrictions.

The Texas Senate approved S.B. 6 in mid-March. The bill, named the Texas Privacy Act, would compel school districts to pass policies requiring schoolchildren to use bathrooms according to their biological sex. It was backed by Lt. Governor Dan Patrick (R). It would also penalize school districts that do not enforce the requirement, fining them between $1,000 and $10,500.

“The Texas Privacy Act was written not to begin a controversy, but to end one,” said state Sen. Lois Kolkhorst (R), who sponsored the bill. “This legislation is a thoughtful solution to a sensitive issue and preserves an expected level of privacy and safety and dignity.”

Matt Sharp of the Alliance Defending Freedom, a conservative legal group, said in January that he sees the bills as a reaction to the Obama administration’s stance on transgender students.

“I think a lot of states stepped up and said, ‘This is not appropriate. We need to determine what is appropriate for schools in our state,'” Sharp said.

It is unclear how much traction the state bills will get. At least thirteen states considered similar legislation last year, but only the North Carolina bill became law.

At least five of the bills — including three in Virginia — have died. Virginia Del. Robert G. Marshall (R-Prince William) filed a bill that would have restricted people to bathrooms that align with the sex on their birth certificate and would have required principals to inform parents if a student asked to be treated as a member of the opposite sex. The legislation died in committee in January, leading the longtime lawmaker to call his colleagues “cowards.”

Opponents, pointing to North Carolina, argue the bills could have financial consequences for states that pass them.

Chase Strangio, a staff attorney with the ACLU LGBT Project, said he is hopeful that state legislatures will reject the measures to avoid the kind of fallout that occurred in North Carolina.

“I would hope that lawmakers would heed the lessons of North Carolina,” Strangio said. “They would be putting not only vulnerable young people at risk … but also jeopardizing the economy in the state at large and also their political futures.”

Sharp said state lawmakers are seeking to protect the privacy of all students by offering alternate accommodations — like teacher’s restrooms or single-stall bathrooms — for transgender students.

“The events of the last year has highlighted the need for privacy protections for all students,” Sharp said.

Transgender students and their parents worry that the bills, even if they do not pass, will stoke fears about transgender people.

Jennifer Campisi is the mother of a 10-year-old transgender boy who attends a public school outside Fort Worth. A Texas lawmaker has filed a bill that would fine a school for allowing students to use a bathroom that does not correspond with their biological sex. Her son, E.J., is not permitted to use the boys’ bathroom, and the bill, if signed into law, would foreclose the possibility that it would ever happen.

“It just seems like it’s targeting an already vulnerable population. These kids have enough to deal with already. They can already have a lot of anxiety and a lot of fear to deal with transitioning,” Campisi said in January. “To have this kind of legislation is going to make them more targeted and more vulnerable.”

Emma Brown contributed.