Democrat Roy Cooper was elected Governor of North Carolina last year on a campaign promise to seek the repeal of H.B. 2, a measure enacted in March 2016 in reaction to the City of Charlotte’s adoption of an ordinance that required businesses and other places of public accommodate to allow transgender people to use multi-user sex-designated facilities consistent with their gender identity. The Republican majorities in the legislature, together with the Republican Governor, Pat McCrory, found this offensive and upsetting on various levels and rushed to take action shortly before the ordinance was to go into effect. H.B. 2 mandated that in all government buildings access to sex-designated facilities be restricted to those whose sexual identification on their birth certificate matched the designation of the facility. Furthermore, the measure preempted political subdivisions from legislating about discrimination. The uproar that ensured was met by Governor McCrory adopting an executive order barring discrimination in the state government on grounds of sexual orientation or gender identity, but making clear that it did not override H.B. 2 with respect to facilities access. McCrory also emphasized that private entities and businesses were free to make their own access rules for such facilities. These moves were not sufficient to stifle criticism. Several lawsuits ensured, preliminary relief was awarded, and various businesses and institutions put boycotts of North Carolina into place to protest H.B. 2. The controversy is widely credited with helping Cooper, then the attorney general who refused to defend H.B. 2 in court, in narrowly stopping McCrory's reelection in a year that otherwise saw a Republican tide in North Carolina, preserving the Republican majorities (veto-proof) in the legislature and awarding the state’s electoral votes to Donald Trump.
Upon taking office Cooper pushed for repeal of H.B.2. After several futile attempts to reach agreement with Republican leaders in the legislature, a “compromise” measure that Cooper was willing to sign emerged late in March. The bill passed both houses on March 30, by 32-16 in the Senate and 70-48 in the House, with most of the opposition coming from the minority Democrats, and Cooper signed the bill promptly, describing it as “not perfect” but an “important step” to repair the state’s tattered reputation.