A federal court has ruled that the measure that “repealed” North Carolina’s anti-transgender HB 2 law does not bar transgender people from using public restrooms or other facilities that match their gender identity.

U.S. District Judge Thomas Schroeder of the Middle District of North Carolina also ruled that plaintiffs would be allowed to move forward with a challenge to restrictions placed on local municipalities by HB 142, the “compromise” measure that allegedly repealed the most pernicious parts of HB 2.

In 2016, in response to the passage of an LGBTQ-inclusive nondiscrimination ordinance in the city of Charlotte, lawmakers passed HB 2, which required that transgender people use only those facilities that match their assigned sex at birth and prevented any localities from passing laws that extended civil rights protections, beyond those currently in law, without seeking prior approval from the Republican-controlled state legislature.

Following the law’s passage, North Carolina experienced a massive economic backlash in response to its restrictions. Boycotts of conventions, sporting events, and concerts ensued, and many prominent companies scuttled plans for expansions in or relocations to North Carolina.

Several states and cities even instituted bans on official travel to North Carolina, some of which remain in effect to this day. The law was even credited with fueling the loss of then-incumbent Gov. Pat McCrory (R), who signed it into effect.

Following McCrory’s loss, Republican legislative leaders and Gov. Roy Cooper (D) tried to reach a compromise to repeal the worst parts of HB 2 and send a message to companies that North Carolina would be a business-friendly environment. So lawmakers passed HB 142, which technically repealed HB 2 while preventing municipalities from passing any law that explicitly allows transgender people to use facilities matching their gender identity, whether now or at any time in the future.

HB 142 also contains provisions that prevent local municipalities from passing nondiscrimination laws that extend protections to LGBTQ people in other areas, such as employment or housing, until Dec. 1, 2020. That is the section of the law that Schroeder is allowing the plaintiffs to challenge.

In total, the American Civil Liberties Union and Lambda Legal are representing six LGBTQ North Carolinians, as well as members of the ACLU of North Carolina, who argue that the state’s attempt to enforce the law is discriminatory and unconstitutional.

In his opinion, Schroeder found that HB 142’s language essentially returned North Carolina to the “status quo” by repealing the language on statewide restroom restrictions for transgender people.

“Nothing in the language of Section 2 [of HB 142] can be construed to prevent transgender individuals from using the restrooms that align with their gender identity,” he wrote.

Furthermore, Schroeder added: “[W]hile HB 142 presents the same barrier to anyone else seeking a protective ordinance as it does to transgender individuals, Plaintiffs observe that transgender individuals have a greater need for protective ordinances than other groups. This is because protective statutes and ordinances that preexist HB 142 — such as Charlotte’s ordinance prohibiting discrimination on the basis of race, color, religion, national origin, or sex — continue to be valid. Thus, Plaintiffs plausibly allege they lack the protections that individuals in other vulnerable groups enjoy.

“Further, although Intervenor-Defendants protest that HB 142 ‘equally forecloses local advocacy for the biological-access policies previously embodied in [HB 2]’ it is transgender individuals who have depended on success at the local level (e.g., the Charlotte ordinance) and biological-access proponents who have depended on success at the state level (e.g., HB 2). As a result, Plaintiffs have plausibly alleged that the foreclosure of new or amended local non-discrimination ordinances relating to public accommodations impacts them disparately.

“The court also finds that — at this preliminary stage — Plaintiffs have plausibly alleged that Section 3 [ of HB 142] was passed with discriminatory intent sufficient to permit their equal protection claim against that section to proceed.”

The plaintiffs and their lawyers celebrated the significance of the victory for the transgender community in North Carolina.

“In light of this ruling, there should no longer be any excuse for discrimination in government facilities against transgender students and employees, who are simply trying to get through daily life like everyone else,” Lambda Legal Counsel Tara Borelli said in a statement. “HB 142 and HB 2 no longer provide a fig leaf for denying transgender people equal dignity and access to public facilities on the same terms that all other North Carolinians can take for granted.”

“I am relieved to finally have the court unequivocally say that there is no law in North Carolina that can be used to bar transgender people from using restrooms that match who we are,” Joaquin Carcaño, the lead plaintiff in the lawsuit, added. “For the past two and a half years, I have been unable to use restrooms in my home state without worrying that I will be subject to discrimination, harassment, or even arrest. Our community has faced so much discrimination because of HB 2 and HB 142, and this decision will give us more support to defend the rights and basic humanity of our community members across the state.”

Chris Brook, the legal director for the ALCU of North Carolina, said that the decision, which was handed down Sunday night, “lessens some of the harm” caused by HB 2 and HB 142.

“The court’s decision does not account for the very real injuries LGBT people have faced under both HB 2 and HB 142, but we will continue fighting for the rights of all LGBT people in North Carolina as this case proceeds,” Brook said. “The bottom line is that LGBT North Carolinians deserve to feel secure in knowing that when they go about their daily lives and interact with businesses open to the public, any discrimination they encounter is unacceptable.”

The Human Rights Campaign also issued a statement celebrating the court’s ruling.

“Today’s ruling made clear that the discriminatory and poorly written HB 142 does not prevent transgender North Carolinians from using restrooms consistent with their gender identity,” HRC Legal Director Sarah Warbelow said in a statement.

“Despite this, the law — and the state — remain deeply problematic for LGBTQ equality,” she added. “It remains impossible for city and town governments to protect LGBTQ people from discrimination, including in public accommodations. What is needed and necessary for LGBTQ people is the full repeal of HB 142 and the enactment of statewide protections.”