RALEIGH, N.C. (AP)A federal judge has temporarily ruled that the University of North Carolina can't block two transgender students and an employee from using bathrooms that match their gender identity.

U.S. District Judge Thomas Schroeder on Friday partially granted a preliminary injunction to the students and the employee in response to their lawsuit challenging a state law limiting protections for LGBT people.

The judge says the injunction only applies to the plaintiffs, but said he also expects them to succeed in their claim that the law known as H.B. 2 violates the federal Title IX law, which bars sex discrimination in schools.

His decision represents a win for the ACLU and Justice Department, which had sued to block the law.

His final decision on the law won't come until after a November trial.