Follow KRLD: Facebook | Twitter

DALLAS (1080 KRLD/AP) – A federal judge in Fort Worth has temporarily blocked the Obama administration’s directive to public schools that transgender students must be allowed to use the bathrooms and locker rooms consistent with their chosen gender identity.

The judge issued the preliminary injunction late Sunday in response to a lawsuit filed by Texas and 12 other states. The lawsuit challenged the directive with lawyers saying during a hearing last week that it was “unconstitutional.”

The transgender facilities issue came to a head recently when Lt. Governor Dan Patrick spoke out against a change in the Fort Worth Independent School District’s policies regarding rules for transgender students.

Texas Attorney General Ken Paxton, a Republican, immediately cheered the decision and issued a statement saying, in part –

“We are pleased that the court ruled against the Obama Administration’s latest illegal federal overreach. 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. That cannot be allowed to continue, which is why we 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.”

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.

Schools were not explicitly told to comply or lose federal funds. But the Obama administration also didn’t rule out that possibility in court documents filed in July, saying 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 Texas and Arizona, 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.

(©2016 CBS Local Media, a division of CBS Radio Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)