FORT WORTH, Texas — Texas and nearly a dozen other states asked a U.S. judge on Friday to block Obama administration guidance to public schools that transgender students must be allowed to use bathrooms of their choice, saying it usurps the authority of school districts nationwide.

But at a hearing in Fort Worth in a lawsuit filed by the states against the U.S. government, Justice Department lawyer Benjamin Berwick urged U.S. District Judge Reed O’Connor to dismiss the injunction request because the federal guidelines issued in May were nonbinding with no legal consequences.

Berwick also said the primarily Republican-governed states objecting had failed to show the guidelines would harm them.

“These documents state explicitly that they do not have the force of law,” Berwick told O’Connor.

The guidance issued by the Justice Department and Education Department said public schools must allow transgender students to use bathrooms that correspond with their gender identity, as opposed to their birth gender, or face the loss of federal funds.

Following milestone achievements in gay rights including same-sex marriage becoming legal nationwide in 2015, transgender rights have become an increasingly contentious issue. The use of public bathrooms has been a key element in the controversy.

The administration’s directive enraged conservatives who say federal civil rights protections encompass biological sex, not gender identity.

Austin Nimocks, a lawyer who represented the Texas attorney general’s office, said the federal recommendations already are being enforced, placing billions of dollars in federal funding for education at risk for states that do not comply.

Nimocks called the guidelines rules that were foisted upon the states and said their reach “extends across the country, to every school district, without exception.” Nimocks asked the judge for a ruling encompassing schools nationwide as soon as possible, saying students are returning to schools in a matter of days.

O’Connor, an appointee of Republican President George W. Bush, peppered Berwick with questions about whether the guidelines were rules that could force states to overhaul their policies regarding bathrooms.

Other states in the Texas-led suit include Alabama, Wisconsin, West Virginia, Tennessee, Arizona, Oklahoma, Louisiana, Utah, Georgia, Mississippi and Kentucky. Ten other states have also separately sued over the guidelines.

LePage spokesman Peter Steele said in May that Maine is not a plaintiff in the suit but that Gov. Paul LePage has signed on to it “pro se,” which means on his own personal behalf.

“The Obama administration continues to be reckless with its overreach of federal mandates on states,” wrote Steele in response to questions from the Bangor Daily News. “Recently, the president unilaterally forced overtime rules on the states, which will have a devastating effect on our economy. The Obama administration is also threatening to use its authority to designate a national monument in the Katahdin region. The president is dictating by fiat, and governors are pushing back.”

LePage’s involvement in the suit against Obama comes about six months after he interjected himself into a federal case in Virginia over a transgender boy’s challenge of his school’s bathroom-use policy, and two years after the Maine supreme court ruled in favor of a transgender girl’s rights in Orono.

In 2014, the Maine Supreme Judicial Court ruled in favor of Nicole Maines in a lawsuit against the Orono school district, guaranteeing transgender students the right to use school bathrooms corresponding to the gender with which they identify.

Maine Attorney General Janet Mills said she was not consulted about the case and without that consultation, Maine cannot be a plaintiff in the case and LePage cannot join it in any official capacity.

“Maine law required approval of the attorney general for anyone other than the attorney general to file an entry of appearance or represent the state in any legal matter, and our approval was not obtained in this case,” said Tim Feeley, a spokesman for Mills. “The governor’s position in this particular matter, moreover, appears to be inconsistent with the law of Maine as enunciated by the Maine supreme court.”

The federal government in its May letter sent to school districts nationwide that while its guidance carried no legal weight, they must not discriminate against students, including based on their gender identity.

The U.S. Supreme Court on Aug. 3 said a Virginia school board may temporarily block a student who was born a girl from using the boys’ bathroom while a legal fight over transgender rights proceeds on appeal.

A federal judge on Aug. 1 heard arguments over whether to stop North Carolina from enforcing its law barring transgender people from using bathrooms aligned with their gender identity in government buildings and public schools. No decision has been issued. North Carolina also has sued the federal government to block the guidelines.

BDN writer Christopher Cousins contributed to this report.