A deal that North Carolina lawmakers reached to repeal the state’s controversial and costly “bathroom bill” passed on Thursday after a contentious debate — but the compromise has left LGBTQ advocates exasperated, with some calling it “shameful” and an “outrageous betrayal.”

Democratic Gov. Roy Cooper signed the bill into law just hours after the state’s House passed the bill 70-48 on Thursday afternoon after nearly two hours of heated debate.

The state’s Senate passed the bill by a 32-16 vote earlier in the day, after a deal was struck late Wednesday between the state’s new governor, who campaigned on fully repealing the HB2 bill, and North Carolina’s leading Republican lawmakers, who have supported the measure.

.Opponents of North Carolina’s HB2 law protest above the state’s House of Representatives chamber in December last year. Jonathan Drake / Reuters, file