(Reuters) - Officials from 11 U.S. states sued the Obama administration on Wednesday to overturn a directive telling schools to let transgender students use bathrooms matching their gender identity, decrying the policy as “a massive social experiment.” Ramping up the simmering battles over contentious cultural issues in America, the states, led by Texas and most with Republican governors, accused the federal government of rewriting laws by “administrative fiat.” “We are willing to fight this all the way to the Supreme Court if we have to,” Republican Texas Attorney General Ken Paxton told reporters in Austin.  Amid a national debate on transgender rights, President Barack Obama’s administration on May 13 told U.S. public schools that transgender students must be allowed to use the bathroom of their choice, upsetting Republicans and paving the way for fights over federal funding and legal authority. The states’ lawsuit accused the federal government of overstepping its constitutional powers by taking actions that should be left to Congress or individual states. It also challenged the Obama administration’s interpretation of federal civil rights law with regard to sex and gender. The lawsuit said the administration “conspired to turn workplace and educational settings across the country into laboratories for a massive social experiment, flouting the democratic process, and running roughshod over commonsense policies protecting children and basic privacy rights.” Texas was joined by Alabama, Georgia, Louisiana, Oklahoma, Tennessee, Utah, West Virginia and Wisconsin, plus Arizona’s Department of Education and Maine’s governor. Paxton said, “It’s about parents who are upset, grandparents who are upset. They want to see that the safety of their children is taken care of.” Transgender rights advocates argued it is transgender people who need protection, particularly transgender women who are disproportionately the victims of assaults and would be forced to use men’s bathrooms if states succeed in forcing people to use bathrooms matching their sex at birth. Likewise, transgender men, many of whom grow facial hair, would be required to use women’s bathrooms along with girls. “This action puts students at risk for the sake of politics,” said Alison Gill of the Trans United Fund advocacy group supporting transgender rights. Gill said the states’ lawsuit did not reflect the position of most school boards and administrators. The administration’s letter to the schools said that to get federal funding under existing rules, schools must agree not to treat students or activities differently on the basis of sex. That includes not treating transgender students differently from others of the same gender identity, officials said. Paul Castillo, a lawyer with Lambda Legal, which supports lesbian, gay, bisexual and transgender (LGBT) rights, said the lawsuit represented an “unprecedented attack against transgender people across the United States.” “These states are demonstrating the great lengths they will go to in order to discriminate against transgender individuals,” Castillo said. Nine of the 11 states that sued have Republican governors, including Maine’s Paul LePage. LePage broke with the Democratic attorney general, Janet Mills, who did not approve of the lawsuit, a spokesman for Mills said. School districts from Texas and Arizona also joined the suit, which names the U.S. government and a host of federal  agencies and officials as defendants. North Carolina sued the federal government on the transgender bathroom issue this month, seeking to protect its state law passed in March that bans people from using public restrooms not corresponding to their sex assigned at birth. Ever since the 1960s civil rights movement, the federal government has asserted its authority to force states to extend equal protection under the law for all. The administration sued North Carolina on May 9, stating that its transgender bathroom law violated the U.S. 1964 Civil Rights Act. The 11 states’ lawsuit accused the administration of taking that argument too far and improperly, widening the scope of interpretation of civil rights law. Title IX of the Education Amendments of 1972 prohibits discrimination on the basis of sex in federally funded education programs and activities. The administration’s interpretation is that the word “sex” extends protection to transgender people, but the issue has not been settled in the courts. “I agree with the Obama administration that ‘sex’ includes ‘gender,’ and ‘gender’ includes ‘gender identity,’” said John Pagan of the University of Richmond’s School of Law in Virginia. Peter Lake of Stetson University College of Law in Florida said the U.S. Supreme Court has taken a narrow view of the meaning of “sex” under the law, but in recent years lower courts have been more likely to defer to the Obama administration’s broader definition. “My sense is a certain momentum is building for broader protection of (LGBT) rights, and we might be seeing a moment of federal civil rights law in long-term transition,” Lake said. The White House did not immediately respond to a request for comment. 