North Carolina Gov. Pat McCrory, who supported the so-called “bathroom bill” considered discriminatory to transgender people, appears to have lost his re-election bid.

The razor-thin margin of victory for Roy Cooper, a Democrat, offers a cautionary tale for Georgia politicians who are likely to again push the General Assembly to embrace “religious liberty” legislation which would curtail the rights of the lesbian, gay and transgender communities.

Less than 4,500 votes separates Cooper, the state’s attorney general, from McCrory. The contest could ultimately hinge on provisional ballots, or questionable votes, expected to be tallied later this month.

McCrory vowed to scour every ballot. Cooper, meanwhile, declared victory.

While Hurricane Matthew, a police shooting in Charlotte and the state’s overall economy played prominent roles in the campaign, the bathroom bill served as something of a referendum on McCrory’s candidacy.

The legislation, HB2, signed by McCrory in March overturned a Charlotte ordinance that extended anti-discrimination protections to the LGBT community. The law prevented local governments from passing ordinances allowing transgender people to use the bathroom of their choice.

National outrage quickly ensued. The NCAA and the Atlantic Coast Conference pulled championship games from the state in protest. Concerts were canceled and business expansions scrapped, including one that would have brought 400 jobs to Charlotte. An estimated $500 million in business was lost.

Georgia Gov. Nathan Deal, under pressure from the state’s business community, vetoed a so-called “religious liberty” bill in March widely viewed as discriminatory to gays and lesbians. GOP officials in Georgia have said they’re likely to resurrect the legislation in the next legislative session that begins in January.

McCrory’s apparent defeat proved even more stinging given that Donald Trump won North Carolina and U.S. Sen. Richard Burr, a Republican, also won re-election.