DURHAM, N.C.—Classes at the University of North Carolina began Tuesday with a big question still unresolved: the fate of HB2, the “bathroom bill” passed by the General Assembly in March. But late Friday afternoon federal Judge Thomas Schroeder delivered a defeat to the law, ruling that the university system cannot enforce it.

The statute requires transgender people to use the bathrooms corresponding to the sex on their birth certificate, rather than their gender identity, in public restrooms and locker rooms, including at schools and state universities. A range of groups are challenging the law, including the U.S. Department of Justice and the ACLU, alleging that the law violates Title IX of the Civil Rights Act as well as the Due Process and Equal Protection clauses of the U.S. Constitution.

The case is just getting started, but several of the plaintiffs—including Joaquín Carcaño, a transgender man who is a student at the University of North Carolina at Chapel Hill—requested an injunction to prevent the law from going into effect as the school year began. On Friday, Schroeder, a judge in the Middle District of North Carolina, sided with the plaintiffs. He wrote:

After careful consideration of the limited record presented thus far, the court concludes that the individual transgender Plaintiffs have made a clear showing that (1) they are likely to succeed on their claim that Part I violates Title IX, as interpreted by the United States Department of Education (“DOE”) under the standard articulated by the Fourth Circuit; (2) they will suffer irreparable harm in the absence of preliminary relief; (3) the balance of equities weighs in favor of an injunction; and (4) an injunction is in the public interest.

To succeed, a challenge does not have to actually win; the plaintiffs simply have to show that they are likely to win their case, based on existing law. Based on Schroeder’s ruling, the UNC system now cannot enforce the law until the court has made a final ruling on the merits of the case.