North Carolina passed a bill on March 30 to repeal a contentious law that had required individuals to use restrooms at public facilities according to their biological sex rather than their gender identity.

The new bill, HB 142, was passed with a 70-48 vote in the House, and a 32-16 vote in the Senate. North Carolina Governor Roy Cooper signed it into law on Thursday (March 31).

HB 142 repeals what has been known as the “bathroom bill,” or HB 2. It also restricts the state government — and all of its agencies, boards, and universities — from regulating access to restrooms, showers, and changing facilities “except in accordance with an act of the General Assembly,” as well as prohibits local governments from passing or changing laws regulating employment and public accommodations in private businesses, both until the year 2020.

The repeal comes after two failed attempts and more than a year of tension over the bathroom law.

“I support the House Bill 2 repeal compromise that will be introduced tomorrow,” said Cooper the night before the bill was voted on. “It’s not a perfect deal, but it repeals House Bill 2 and begins to repair our reputation.”

North Carolina faced much backlash since HB 2 was passed in 2016. Most notably, the NCAA announced it would no longer host its championship basketball games in the state after North Carolina passed the law.

The NCAA released a statement on April 4 stating that North Carolina will now be included in its process of selecting the site for championships, and that the previous decision to host the 2017-18 championships in the state will remain.

“We have been assured by the state that this new law allows the NCAA to enact its inclusive policies by contract with communities, universities, arenas, hotels, and other service providers that are doing business with us, our students, other participants, and fans,” the NCAA said in the statement.

“Further, outside of bathroom facilities, the new law allows our campuses to maintain their own policies against discrimination, including protecting LGBTQ rights, and allows cities’ existing nondiscrimination ordinances, including LGBTQ protections, to remain effective,” it added.

Meanwhile, the new law was still met with measured embrace as well as criticism from both sides of the aisle. Some saw it as a commendable compromise, while others on both ends saw it as an effort that didn’t produce satisfactory results.

“This bill is at best a punt. At worst it is a betrayal of principle,” said Republican Senator Dan Bishop, a primary sponsor of HB 2 who opposed the new bill.

Republican Representatives Tim Moore and Phil Berger said in a joint statement that they are “pleased this proposal fully protects bathroom safety and privacy,” as it allows state legislators to determine the regulation of facilities like restrooms, and also prevents local governments from passing ordinances like Charlotte’s until 2020.

Some LGBTQ activists criticized the bill, saying that it isn’t a complete repeal of HB 2 and still enables discrimination.

“This ‘deal’ does NOT repeal #HB2. It’s simply another version of HB2 dressed up in a way desperate lawmakers hope will save state’s economy,” tweeted Chad Griffin, president of the Human Rights Campaign.