North Carolina is about to repeal its controversial bathroom bill.
North Carolina is about to repeal its controversial bathroom bill. - 

The controversial North Carolina “bathroom law” is going down the toilet.

The state’s lawmakers and Governor Roy Cooper reached a deal late Wednesday night to repeal the HB2 law. This morning, the state Senate voted in favor of the repeal in a 32-16 vote. The repeal later passed through the House and became official in the late afternoon when it was signed by Cooper.

The repealed law required  transgender people to use the public restroom corresponding to the gender listed on their birth certificate. The law also excluded gender identity and sexual orientation from statewide anti-discrimination protections.

The “bathroom law” went into effect last year despite outcry from the LGBT community and boycotts from businesses as well as sports organizations like the National Collegiate Athletic Association.

North Carolina lawmakers were under pressure to reach an agreement on a repeal in order to be considered for future NCAA tournaments. The NCAA is meeting this week to determine game schedules from 2018 to 2022 and was expected to exclude North Carolina from its list of possible places to hold tournament games if HB2 was not repealed.

Over the past year, dozens of conventions, sporting events and concerts have been canceled or moved to other states. Among the many companies calling for the law to be repealed was PayPal, which also announced that it was canceling its plans for a new operational center, costing the state 400 jobs. A recent Associated Press analysis found that the law could cost North Carolina more than $3.76 billion in lost business over a dozen years.

The repeal is the first step to minimizing those losses.

"It's not a perfect deal, but it repeals House Bill 2 and begins to repair our reputation," Cooper said Wednesday evening after the agreement was reached.

Under the repeal agreement, regulation of multi-occupancy facilities falls under the state’s control, and local governments cannot pass their own ordinance regarding bathroom regulations.

LGBT groups have not been consulted over the repeal agreement, Chris Sgro, executive director of Equality NC, told CNN. According to him, the agreement is a “shell piece of legislation” that prevents municipalities from protecting people from discrimination.

This story was updated at 4:18 p.m. EST.

Follow Jana Kasperkevic at @kasperka