AUSTIN, Texas (AP) — A federal judge in Texas has temporarily blocked an Obama administration directive on bathroom rights for transgender students in U.S. public schools.

U.S. District Judge Reed O’Connor in Fort Worth issued the preliminary injunction Sunday.

Texas and 12 other states asked O’Connor to halt the directive after 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 gender on their birth certificates. U.S. Attorney General Loretta Lynch had likened that law to policies of racial segregation.