A federal judge in Texas has temporarily blocked the Obama administration guidance that would require schools to comply with transgender bathroom policies or lose federal funding.

"Schools have a duty to protect the privacy, safety, and dignity of all students, and this order certainly helps them in fulfilling that duty," said Matt Sharp, legal counsel with Alliance Defending Freedom.

"The Obama administration cannot unilaterally disregard and redefine federal law to accomplish its political agenda of forcing girls to share locker rooms and showers with boys."

The religious freedom legal group Alliance Defending Freedom is litigating several cases involving the federal order in Illinois, North Carolina and Ohio.

Judge Reed O'Connor of the U.S. District Court for the Northern District of Texas on Aug. 21 issued a preliminary injunction on the Obama administration's interpretation of Title IX, a federal law which bars discrimination on the basis of sex in schools, colleges and universities that receive federal money, CNN reports.

The judge said the law is "not ambiguous" and specifically allows schools to provide separate toilets, locker rooms, and showers on the basis of sex, as long as the facilities are comparable.

He said the response to the federal guidance "presents the difficult issue of balancing the protection of students' rights and that of personal privacy when using school bathrooms, locker rooms, showers, and other intimate facilities, while ensuring that no student is unnecessarily marginalized while attending school."

The federal guidance from the Department of Justice and Department of Education was announced in a May 13 letter sent to all school districts. The guidance tells every public school in the country to allow students who identify as transgender to use the facilities – including restrooms and locker rooms – that match their "gender identity." It says that a student's gender identity must be treated as his or her biological sex for the purposes of law.

The guidance included a 25-page document of emerging practices, which may also affect sex-segregated athletics.

Although the federal guidance does not have the force of law, it implicitly threatens schools that do not comply with lawsuits or a loss of federal aid, according to the New York Times.

A Department of Justice spokesperson expressed disappointment in the decision and said the department was reviewing its options.

Texas Attorney General Ken Paxton said the ruling countered "the Obama administration's latest illegal federal overreach." He said opponents of the guidance took action "to protect states and school districts, who are charged under state law to establish a safe and disciplined environment conducive to student learning."

LGBT advocacy groups like Lambda Legal, the ACLU and the National Center for Lesbian Rights said a ruling by a single judge "cannot and does not undo the years of clear legal precedent nationwide establishing that transgender students have the right to go to school without being singled out for discrimination."

For Sharp, however, the ruling made clear that the administration "ignored the federally required public notice and comment process as well as the crystal clear meaning of Title IX in its attempt to force its will on the American people."

In May the U.S. Catholic bishops said the guidance failed to address many important concerns and "contradicts a basic understanding of human formation so well expressed by Pope Francis: that 'the young need to be helped to accept their own body as it was created.'"

They also noted the need to show respect to students.

(Story continues below)

"Children, youth, and parents in these difficult situations deserve compassion, sensitivity, and respect," the bishops said. "All of these can be expressed without infringing on legitimate concerns about privacy and security on the part of the other young students and parents."