Paul J. Weber, The Associated Press

AUSTIN, Texas (AP) — A federal judge in Texas is blocking for now the Obama administration's directive to U.S. public schools that transgender students must be allowed to use the bathrooms and locker rooms consistent with their chosen gender identity.

On Monday — the first day of class for most public schools in Texas — hundreds of school districts awoke to news of the order by U.S. District Judge Reed O'Connor.

His decision dated Sunday comes after Texas and 12 other states challenged the Obama directive as unconstitutional. O'Connor ruled that the federal education law, Title IX, "is not ambiguous" about sex being defined as "the biological and anatomical differences between male and female students as determined at their birth."

He also sided with Republican state leaders who argued that schools should have been allowed to weigh in before the directive was announced in May.

Texas Attorney General Ken Paxton, a Republican, had argued that halting the law before school began was necessary because districts risked losing federal education dollars if they didn't comply. Federal officials didn't explicitly make that threat upon issuing the directive, although they also never ruled out the possibility.

"This president is attempting to rewrite the laws enacted by the elected representatives of the people, and is threating to take away federal funding from schools to force them to conform," Paxton said. "That cannot be allowed to continue, which is why we took action to protect states and school districts."

The Education and Justice departments did not immediately react to the injunction.

Paul Castillo, a Dallas attorney for the gay rights group Lambda Legal that had urged the court to let the directive stand, said the ruling was a continuation of attacks on transgender people.

"I think today is going to be a hard day for transgender students," Castillo said. "The decision is certainly emotional, and certainly an attack on transgender students' dignity."

The federal government told U.S. public schools in May that transgender students must be allowed to use bathrooms and locker rooms consistent with their chosen gender identity. That announcement came days after the Justice Department sued North Carolina over a state law that requires people to use public bathrooms that correspond with the sex on their birth certificate, which U.S. Attorney General Loretta Lynch had likened to policies of racial segregation. Republicans have argued such laws are commonsense privacy safeguards.

The Obama administration had told the court that recipients of federal education dollars "are clearly on notice" that antidiscrimination polices must be followed. Texas alone gets roughly $10 billion in federal education funds.

The lawsuit was filed in May by Texas, Alabama, Wisconsin, West Virginia, Tennessee, Oklahoma, Louisiana, Utah and Georgia, and the Republican governors of Maine, Mississippi and Kentucky. Two small school districts in Arizona and Texas, which have fewer than 600 students combined and no transgender persons on their campuses, also joined the effort to prevent the directive from being enforced.

__

Follow Paul J. Weber on Twitter: www.twitter.com/pauljweber