AUSTIN — A Texas court ruling earlier this year that blocked the federal government's transgender bathroom rules applies nationwide, the Fort Worth judge presiding over the case said Tuesday.

In late August, U.S. District Judge Reed O'Connor issued a temporary injunction against the Obama administration's new guidelines that said schools must allow transgender students to use the bathroom and locker room of their choice. But the federal government requested a clarification, asking whether O'Connor's ruling truly applied nationwide or just to the 13 states, including Texas, that filed the original lawsuit to block the guidelines.

On Tuesday, O'Connor clarified his ruling, saying it applies to every school in the country, from California to North Carolina.

"A nationwide injunction is necessary because the alleged violation extends nationwide," O'Connor wrote. "Defendants are a group of agencies and administrators capable of enforcing their Guidelines nationwide, affecting numerous state and school district facilities across the country."

Schools can still choose to adopt the guidelines and allow transgender students to use the "intimate facilities" that correspond to their gender identity. But O'Connor's ruling means they won't have to. When the guidelines were unveiled in May, school leaders worried they would lose millions in federal funds if they refused.

Judge added his previous ruling against anti-#trangender bathroom rules for students applies to ALL states, not just Texas. 3/? #txlege

Texas Attorney General Ken Paxton said he was "proud" to lead the coalition fighting the guidelines, adding that "a nationwide injunction should send a clear message to the president that Texas won't sit idly by as he continues to ignore the Constitution."

Paxton and his predecessor Greg Abbott, now governor of Texas, have spent millions suing the federal government over guidelines and rules with which they disagree. The state is locked in legal fights with the Obama administration on everything from clean air rules to internet domain names.

The state has been at the forefront of the culture war over transgender rights, with Paxton and other state leaders criticizing local school districts that have adopted the federal guidelines and proposing to pass anti-LGBT legislation similar to North Carolina's controversial House Bill 2. The day after the August win in O'Connor's court, Paxton filed another lawsuit to block new federal health care rules that ban discrimination by doctors, hospitals and insurers against transgender persons.

The fight over the bathroom guidelines isn't over, however. While O'Connor made clear that the federal government can still battle in court for the rights of transgender Americans, the judge has not yet decided whether his August injunction applies to transgender teachers and staff and how it would affect OSHA and Department of Labor rules.

But the judge's injunction is temporary. In the coming months, the court will discuss the broader debate at the heart of the lawsuit: whether "sex" and "gender" have essentially the same meaning under federal discrimination rules. If they do, the government's rules can stand. If they don't, the next president probably would have to decide whether to restart the rule-making process.