Cooper was joined on the settlement by the American Civil Liberties Union and trans people who have sued the state.

The Governor said: “In 2016, HB2 cast a dark shadow over our state. Not only was it wrong in and of itself, but it cost us jobs. It cost us money. And it cost us our reputation.

“When I signed HB142, I said it wasn’t a perfect solution. But I believe it was an important step forward for our state. And when I signed it I was clear — our work to make North Carolina better for everyone was not finished.

“Today, we take the next steps as I put into place the most comprehensive anti-discrimination provisions North Carolina has ever had and I submit a settlement of a lawsuit that can help us put HB2 even further behind us,” he added.

He also said this was not his final goal, writing: “My ultimate goal is a statewide non-discrimination law with broad protections, and I will keep striving for it.”

(Flickr/North Carolina National Guard)

The law’s harmful effects would be negated by the decree, civil rights groups have told Reuters.

However, the judge on the lawsuit still has to sign before it can be implemented.

Republican legislative leaders, who have intervened in the court dispute, were unsurprisingly not included in the agreement.

Joaquín Carcaño, a trans man who is the lead plaintiff in the lawsuit, said the agreement would represent an important step for LGBT rights in the state.

“Nothing can make up for the cruel and senseless attacks transgender people have faced in North Carolina,” he said, “but I am hopeful that the court will agree to clarify the law so that we can live our lives in less fear.”