The state of North Carolina can't currently enforce a controversial law that prevents transgender people from using public bathrooms and other facilities that match their gender identities.

U.S. Judge Thomas Schroeder, a George W. Bush appointee, on Monday signed a consent decree submitted jointly by LGBT advocacy groups and North Carolina Gov. Roy Cooper (D).

ADVERTISEMENT

The decree says the state's executive branch is permanently prevented from using the law to "bar, prohibit, block, deter, or impede any transgender individuals from using public facilities under any Executive Branch Defendant’s control or supervision, in accordance with the transgender individual’s gender identity."

The law, known as H.B. 142 replaced a previous law known as H.B. 2. The consent decree was specific to H.B. 142 and the part of the case challenging the legality of H.B. 2 when it was in effect remains unresolved, according to the American Civil Liberties Union of North Carolina.

"I am relieved that we finally have a court order to protect transgender people from being punished under these laws,” lead plaintiff Joaquin Carcaño, said in a statement.

“This is a tremendous victory but not a complete one,"Carcaño added, "It remains devastating to know that local protections for LGBTQ people are still banned under state law while so many members of our community continue to face violence, harassment, and discrimination simply because of who we are."

Cooper spokesman Ford Porter praised the development in a statement.

"North Carolina is welcoming to all people and open for business," he said. "Today’s decision is an important step to putting the harmful impacts of HB 2 in the rear-view mirror for good."

A spokesman for North Carolina House Speaker Tim Moore (R) told The Hill in a statement that state lawmakers are studying the judge’s decision and assessing their options.

—Updated at 3:54 p.m.