Updated

Texas and 10 other states filed suit Wednesday against the Obama administration over its directive on transgender student access to public school facilities, firing the first shot in what is likely to be a protracted and messy legal battle over that guidance.

The suit was filed in a Texas federal court in response to the directive handed down to schools earlier this month that said transgender students should be able to use bathrooms and locker rooms that match their gender identity.

Texas Attorney General Ken Paxton announced the lawsuit at a Wednesday news conference, saying the directives represent an attempt by the administration to rewrite the law.

“This represents just the latest example of the current administration’s attempts to accomplish by executive fiat what they couldn’t accomplish through the democratic process in Congress," Paxton said.

Joining Texas in the suit were: Alabama, Wisconsin, West Virginia, Tennessee, Arizona's Department of Education, Maine Gov. Paul LePage, Oklahoma, Louisiana, Utah and Georgia.

“Defendants have conspired to turn workplaces 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,” the lawsuit says.

Conservative states had vowed to defy the federal directive, calling it a threat to the safety of students. Texas' lieutenant governor has previously said the state is willing to forfeit $10 billion in federal education dollars rather than comply.

"President Obama has excluded the voice of the people. We stand today to ensure those voices are heard," Paxton said.

The directive from the U.S. Justice and Education departments represents an escalation in the fast-moving dispute over what is becoming the civil rights issue of the day.

While the letter does not have the force of law, it does warn that schools that do not abide by the administration’s interpretation of civil rights under the Title IX law may face lawsuits or loss of federal aid.

"There is no room in our schools for discrimination of any kind, including discrimination against transgender students on the basis of their sex," Attorney General Loretta Lynch said in a statement when the guidlines were announced earlier this month.

The guidance was issued after the Justice Department and North Carolina sued each other over a state law that requires transgender people to use the public bathroom that corresponds to the sex on their birth certificate. The law applies to schools and many other places.

Supporters say such measures are needed to protect women and children from sexual predators, while the Justice Department and others argue the threat is practically nonexistent and the law discriminatory.

The Associated Press contributed to this report.