Pat McCrory, the former governor of North Carolina who signed House Bill 2 into law, has called repeal of the legislation a defeat for LGBT activists.

Despite loud objections from LGBT advocates, Democratic Governor Roy Cooper signed the legislation on Thursday.

House Bill 2 was approved last year during a one-day special session. It blocks cities from enacting LGBT protections and prohibits transgender people from using the bathroom of their choice.

The compromise bill approved Thursday, House Bill 142, repeals House Bill 2, but it also leaves bathroom regulation to the state and enacts a moratorium on local LGBT ordinances until December 1, 2020.

McCrory has blamed his reelection defeat on the uproar over the controversial law.

(Related: On his way out, Pat McCrory blames anti-gay law for election loss.)

“The good news is this: [LGBT rights advocate the Human Rights Campaign (HRC)] lost the battle,” McCrory said during an appearance on Washington Watch, the radio show hosted by Christian conservative Tony Perkins. “With their resources and power and money, and their tying to get some other corporations to help support them in the battle … [The] fact of the matter is, they did not get a full repeal of HB2.”

McCrory added that he believes the issue will be decided by the Supreme Court.

“Hopefully, with a new Supreme Court justice that's been nominated by President Trump, there will be a ruling in which we keep the definition of gender as we've been using in the 1964 Civil Rights Act for generations. And I think that's where this is going to [be] resolved,” McCrory said, referring to the right of transgender people to use the bathroom of their choice.

A lawsuit brought by the ACLU to stop enforcement of HB2 has likely been derailed by its repeal.