As the candidates for North Carolina attorney general, Republican Buck Newton and Democrat Josh Stein, met September 20 at Asheboro’s Sunset Theatre for their only formal debate, they couldn’t have known that just 90 minutes to their south and west, riots were about to break out in Charlotte.

That was the same day Keith Lamont Scott was shot and killed by a police officer after reportedly resisting arrest and brandishing a gun. Although both men were black, national media and political activists immediately jammed the incident into their narrative frame of racially tinged conflicts between African Americans and law enforcement. On that Tuesday evening in Charlotte, what began as public protests turned into a frenzy of nationally televised violence, with rioters capitalizing on the city’s inadequate security precautions to smash windows, loot stores, and attack innocent people.

At the attorney general debate, co-hosted by the North Carolina Institute of Political Leadership and the Asheboro/Randolph Chamber of Commerce, Newton and Stein were not yet aware of the unfolding crisis in Charlotte. But they were asked about the broader issue of police shootings and racial tensions.

“It’s very unfortunate that so many have decided for political gain to vilify our law enforcement officers” even as they’re being gunned down in Dallas, Baton Rouge, and across the country, Newton said. “As attorney general, I will not stand for it.” He added that “the vast majority of time, our law enforcement community does it right.”

Stein agreed that police officers deserve public praise and support for running into the danger that most of us instinctively flee. But he also pointed out that there are “bad actors” in every profession, including law enforcement. “When they do wrong, they need to be held accountable,” Stein said.

Crime and law enforcement haven’t been major voting issues in recent elections. It’s not hard to see why. Crime rates have been falling for decades. Lately, North Carolina has actually been outpacing the nation in this regard. From 2012 to 2015, the state’s violent-crime rate fell by nearly two percent and its property-crime rate by 18 percent, vs. national declines of one percent and 13 percent respectively.

But high-profile shootings involving black suspects and law enforcement may be changing the political calculus, it seems to me. Some voters see the Scott shooting and other cases as evidence of institutional racism, inadequate gun laws, or at least poor management and training of police. Other voters see the Black Lives Matter movement and its media enablers as extreme, heedless of the facts of these tragic cases, and endangering the lives of innocent people — most of whom are themselves black or Hispanic — by inducing a “Ferguson effect” in which police officers become less assertive, criminals more assertive, and communities less safe.

The latest federal crime report isn’t reassuring here. In 2015, the U.S. homicide rate jumped 10 percent — one of the biggest annual increases ever. (North Carolina’s rate rose a much-lower but still-troubling three percent.) Nevertheless, keep in mind that homicides, and reported crimes in general, are significantly rarer, in proportion to the population, than they were a generation ago.

In North Carolina, another flashpoint has been the performance of the state crime lab under current Attorney General Roy Cooper, the Democratic nominee for governor. During the debate in Asheboro, Stein, who worked for Cooper, said that the backlog in lab testing of forensic evidence had already been substantially reduced and could be further improved by spending more state money on scientists, technicians, and lab equipment. Newton responded that the backlog was still “horrendous” and added that the state had “poured millions of dollars in new money into the crime lab” over the past three years without getting adequate results.

The first and foremost job of any government is to protect individual rights to life, liberty, and property by enforcing the law, maintaining order, and providing fair, efficient courts to administer justice and adjudicate disputes. How well are North Carolina governments performing this job?

John Hood is chairman of the John Locke Foundation and appears on the talk show “NC SPIN.” You can follow him @JohnHoodNC.