Washington (AFP) – North Carolina on Thursday repealed a contentious law restricting transgender people’s use of public bathrooms in a bid to end a year-long controversy, but LGBT rights groups warned that a substitute measure still allows for discrimination.

The so-called “bathroom bill,” narrowly passed in March last year, triggered big business boycotts of the southeastern US state and the cancellation of major sporting events. 

North Carolina’s legislature repealed the measure Thursday, and the state’s Democratic Governor Roy Cooper signed the replacement bill into law.

“For over a year now, House Bill 2 has been a dark cloud hanging over our great state,” Cooper told reporters in Raleigh as he delivered a stinging rebuke of the law.

“It has stained our reputation, it has discriminated against our people, and it has caused great economic harm in many of our communities.”

The move follows an agreement struck between Republican lawmakers and Cooper aimed in part at removing the negative spotlight the bill had shone on their state.

The initial legislation in North Carolina — a swing state that helped elect Republican Donald Trump president last November — featured prominently in the broader cultural war between conservatives and liberals in contemporary America.

Signed by the previous Republican governor and often referred to as HB2, the law stated that in schools and government buildings transgender people had to use restrooms corresponding with the gender on their birth certificate, not their current gender identity.

“Compromise is difficult for both sides, but we are pleased this proposal fully protects safety and privacy by keeping men out of women’s bathrooms, and removes the distraction of HB2 from North Carolina’s success story of outpacing the rest of the United States in job growth,” state Senate President Phil Berger said in a statement.

The replacement bill makes a concession to conservatives by keeping the regulation of bathrooms under state control until December 2020 — thereby barring local authorities from enacting anti-discrimination laws.

It was an anti-discrimination ordinance in the city of Charlotte that touched off a furious debate in February 2016. That rule allowed transgender people to use the restroom of their choice.

“This is the best deal that we could get,” the governor insisted, adding that he would have preferred a straight repeal of the bill.

“I know we’ve got more to do,” Cooper said.

But with the new measure, “we begin to end discrimination in North Carolina. We begin to bring back jobs and sporting events. We begin to repair our reputation.”

– ‘Fake repeal’ –

Rights groups strongly condemned the compromise deal, with the Human Rights Campaign warning that any lawmaker who supports it is “no ally of LGBTQ people.”

“This proposal masquerading as a solution is really an extreme license to discriminate — the last thing that North Carolina needs,” said Cathryn Oakley, the group’s senior legislative counsel.

North Carolina’s bathroom bill was the first of its kind, and it has hurt the state’s bottom line.

Major corporations, performers like Bruce Springsteen and sports leagues have boycotted the state. The governor had warned that HB2 “could cost us nearly $4 billion.”

The 2017 NBA All-Star Game was moved out of Charlotte to New Orleans, causing millions of dollars in lost revenue.

The National Collegiate Athletic Association, which opposed the bathroom bill, this week began considering site selections for 2018-2022 championships.

The NCAA recently sent a stern message to the Tar Heel State, warning that “absent any change in the law, our position remains the same regarding hosting current or future events in the state.”

Cooper acknowledged that the deadline amounted to immense pressure on Republican lawmakers to repeal the bathroom bill, or face the embarrassment of an NCAA boycott.

The NCAA had yet to publicly comment on the new measure.

The American Civil Liberties Union, meanwhile, joined other rights groups in blasting the compromise.

“Fake repeal of HB2 leads to real lawsuit from us,” the ACLU said on Twitter. “We’ll see you in court.”