A U.S. District Court judge on Sunday blocked the Obama administration from implementing new rules aimed at allowing transgender students to use bathrooms and locker rooms of their choice.

The ruling, by Judge Reed O’Connor of Fort Worth, Texas, is a win for the 13 states that had sought to prevent the administration’s directives from taking effect. It comes a month after the Supreme Court blocked a lower court order allowing a student in Virginia to use the boys' bathroom during the upcoming school year.

ADVERTISEMENT

The Departments of Justice and Education issued new directives on May 13 that prevented schools from treating transgender students differently from other students who share a gender identity. The rules required schools to provide transgender students with “equal access to educational programs and activities” even over the objections of other students and parents.

The directive is not legally binding, though conservatives said it opened the door for the federal government to block funding to schools that did not comply.

In his 38-page ruling, O’Connor found the Obama administration had failed to follow the Administrative Procedures Act, which requires the federal government to allow for comments on new proposed rules. O’Connor did not rule on the constitutionality of the directive itself.

Representatives of the 13 states who sued to block the directive cheered the injunction.

“We are pleased that the court ruled against the Obama Administration’s latest illegal federal overreach,” Texas Attorney General Ken Paxton (R) said in a statement. “This President is attempting to rewrite the laws enacted by the elected representatives of the people, and is threatening to take away federal funding from schools to force them to conform.”

Groups that back transgender rights said the ruling would put students at risk just as they prepare to return for the new school year.

“All students, regardless of their gender identity, deserve to be able to learn in an environment free from discrimination,” said Sarah Warbelow, legal director at the Human Rights Campaign. “Despite this judge’s decision, schools are not barred from following the federal guidance, and school administrators still have a responsibility to ensure that the civil rights of all students are respected and that transgender students have access to facilities consistent with their gender identity.”

The Obama administration did not immediately respond to the ruling.

Transgender rights have become the latest front in the wars between social conservatives and LGBT rights advocates, after the Supreme Court ruled that same-sex marriages were legal under the Constitution. The Justice Department earlier this year sued North Carolina over a law that would block transgender people’s access to bathrooms that match their gender identities.

Attorneys general in states like Texas, Arizona, Georgia and Wisconsin waited just more than a week before suing the administration over its new directive.

O’Connor was appointed to the federal bench by President George W. Bush. He was confirmed in 2007.

This story was updated at 10:13 a.m.