WINTERVILLE, N.C.—Bill Hopseker is a Republican-leaning military veteran who describes himself as “the average American working person.” He thinks America is heading in the wrong direction. Outside a Sam's Club store in a small North Carolina town on Wednesday, he said he'll be voting for Donald Trump.

And that he will not even think about voting for the Republican governor.

"Doing something like this,” he said, “really tarnishes a person."

What Pat McCrory did is sign and defend a law banning transgender people from using the bathrooms of their choice.

"I wouldn’t vote for anybody that does something like that. The logic, I just can’t figure it out at all. Why you would even care?” said Hopseker, 56. “Just because they were born that way – I don’t know. It’s not comprehensible for me. It’s just too stupid.”

The law, widely known as HB2 (for House Bill 2), is straight out of a long-successful Republican electoral playbook: pick a fight about LGBT people, rile up social conservatives, ride the fury turnout to victory.

This time, it is not working.

The backlash to HB2 has been so fierce that it might cost the governor his job. McCrory is down by an average of four points to Democratic attorney general Roy Cooper, and analysts say HB2 is one of the biggest reasons why.

November 8 could well be the first and last time someone loses a major U.S. election over a matter of transgender rights.

"Karma," Skye Thomson, a 15-year-old transgender boy in the small town of Winterville, said with a slight smile.

The response to HB2 reflects not only the rapid shift in American attitudes about LGBT rights but changes in the makeup of North Carolina itself. And it demonstrates, again, the power that corporations can wield in civil rights battles.

The state has one of the country's most aggressively conservative legislatures. But its HB2-fuelled reputation as a bigoted backwater has never been less accurate.

“I, at least in my heart of hearts, like to believe that North Carolina isn’t exactly full of a bunch of bigoted jerks,” Thomson said. “And it looks like it’s not.”

The population has grown more liberal and less white over the last decade as young and educated workers have flocked to its urban areas, particularly Charlotte and the booming Research Triangle around Raleigh and Durham.

Since 2008, they have helped to turn North Carolina into a true swing state after three consecutive decades of Republican triumphs. Hillary Clinton now holds a narrow lead over Trump.

“The last five years, there have been vast changes in our state,” said Ron Baity, a conservative pastor in Winston-Salem and president of the “Judeo-Christian values” advocacy group Return America. “If this thing goes down, our governor gets voted out, then we’re going to have to bow our heads in shame and say we, not only our state but our nation, has changed drastically in the wrong direction.”

HB2 was hastily passed in response to a decision by Charlotte’s city council to expand its anti-discrimination law to include transgender people. The law was designed, Republicans say, to protect women and girls from supposed transgender predators – “men dressed as women” – who would suddenly, supposedly, be using women’s bathrooms.

There is no evidence that transgender bathroom predators are an actual problem. One analysis found three U.S. bathroom assaults by biological men dressed as women in the last 17 years.

North Carolina’s small towns and rural communities remain deeply conservative. Even there, though, enough people have shifted just enough to cause a problem for McCrory in a tightly contested state. Diane Poole, a retired hospital administrator in a city of 21,000, is a Republican who has trouble remembering precisely how to say “LGBTQA.” But her daughter is a lesbian, and HB2 makes her “mad.”

“It hurts them in ways that are just unnecessary and unjust,” she said. “We’re beyond that now. As a nation. As a civilized people.”

Loading... Loading... Loading... Loading... Loading... Loading...

Many North Carolinians believe it is perfectly reasonable to limit people to the bathroom matching their birth sex. But they care more about jobs. A series of high-profile corporate cancellations in response to HB2 has threatened McCrory’s central campaign clam: that he is the architect of a “Carolina Comeback” economic revival.

“What you’re finding is that the only way to get these guys to listen, really listen, is to hit them financially,” said Erica Starling, 40, a transgender activist in Charlotte. “And I don’t think he anticipated the blowback.”

Part of the blowback is about the broadness of the law. Often called a “bathroom bill,” HB2 also prevents local governments from setting minimum wages higher than the state wage, limits the rights of all residents to sue for discrimination, and invalidates all local anti-discrimination laws – including those protecting veterans.

“There are people who may be uncomfortable with LGBTQ rights and even the discussion of LGBTQ rights but see the bill as overreaching,” said David McLennan, political science professor at Meredith College.

In the end, what may doom McCrory is not North Carolinians’ views on bathrooms but their love of basketball.

PayPal canceled a 400-job expansion in Charlotte. More than 30 cities or states banned non-essential government travel to North Carolina. But no withdrawal hit harder than the NCAA decision to move seven college championship events, including March Madness.

“You talk about the father, son and Holy Ghost in the trinity. Well, the fourth in the trinity among a lot of North Carolinians could be basketball,” said Tom Eamon, an East Carolina University political science professor and expert in North Carolina politics. “That’s really a major preoccupation, almost a religion, among lots of North Carolinians. And all those cancellations begin to get people caring about it who had not cared about it one way or another up to that point.”

The organized Christian right, a powerful North Carolina force, is undeterred by the economic hits. Baity calls transgenderism a “mental sickness” that “puts its fist in the face of God.” He has been travelling the state asking pastors to urge their flocks to save McCrory.

“There’s a lot more involved than finances. And that is the very well-being of oncoming generations,” he said.

It is harming Thomson’s well-being right now.

He has spoken out against the law in an open letter to the governor and in testimony to state lawmakers. He is cheered by the backlash, and he is optimistic that equality will eventually prevail.

But he tries to avoid going out in public, worried about ridicule and assault, and he left high school last month in favour of homeschooling. Because of HB2, he said, the first thing many people are hearing about transgender people is that they “go into bathrooms and molest children.”

“Now, everyone’s afraid of trans people because of what the lawmakers are saying. Because fearmongering,” he said. “And I’m just scared of people. Scared people are angry people, and angry people are scary.”