Two prominent LGBT rights groups on Friday endorsed Roy Cooper for governor of North Carolina.

The Human Rights Campaign (HRC) and Equality NC made the endorsement in a joint statement.

Cooper, the state's Democratic attorney general, is campaigning to unseat Pat McCrory, the state's Republican governor.

McCrory gained national attention after he signed House Bill 2, which blocks cities and local municipalities from approving LGBT protections and prohibits transgender people from using the bathroom of their choice. McCrory has stood by the law despite ongoing protests against it.

Cooper has refused to defend the law in court, forcing McCrory to hire outside lawyers.

“Roy Cooper is a stalwart advocate for LGBTQ equality and a proven leader who will work to make the Tar Heel State inclusive and welcoming for all,” said HRC President Chad Griffin. “Day after day, Pat McCrory has continued his reckless defense of the discriminatory HB2 with disregard for the very real harm inflicted on the people, reputation and economy of North Carolina. As governor, Roy Cooper will work to repeal HB2, stand up for common decency and fight to pass statewide, LGBTQ-inclusive, non-discrimination protections. The choice this election couldn’t be clearer. And we are proud to endorse Roy Cooper for Governor so that each and every LGBTQ person across North Carolina can finally live free from fear of discrimination.”

“Roy Cooper is the leader we need for North Carolina. He has a strong track record of fighting for civil rights, education and economic growth that Pat McCrory lacks,” said Equality NC Executive Director Chris Sgro. “While Pat McCrory has caused deep harm to both the LGBTQ community and the economy of our state every day since the passage of HB2, Roy Cooper has been a leader we need. The choice could not be clearer – we must elect Roy Cooper as our next governor.”

(Related: At Donald Trump rally, Pat McCrory ridicules transgender rights.)