CHARLOTTE — For two nights, enraged residents here have taken to the streets in both peaceful and violent demonstrations following the fatal police shooting of Keith Lamont Scott, 43.

Police have said Scott raised a gun toward an officer. Scott’s family members have said he had a book in his hands. Activists have noted that North Carolina is an open-carry state — and that even if Scott was armed, they want to see proof of him raising the weapon in a way that would justify lethal force.

Body-camera video of the incident could settle the dispute over whether Scott was armed, but police and city officials have declined to make the video public.

Last year, Charlotte became the first city in North Carolina to equip all of its uniformed officers with body cameras. Although the officer who shot and killed Scott was in plainclothes and not wearing a body camera, officials have said that parts of the interaction were captured by body cameras worn by other officers as well as a dash-mounted camera.

This tussle — between public calls for transparency and police pleas for patience — has played out in dozens of U.S. cities in the past two years. Citing cases such as the shootings of Walter Scott, where video upends the police narrative of events, many activists argue that the only way they can know for sure what happened in an incident is if officials release video. Police departments often say that releasing the video too soon could undermine their investigations of these incidents.

“Transparency is in the eye of the beholder,” Charlotte-Mecklenburg Police Chief Kerr Putney said at a news conference  Thursday morning. “I’m going to be very intentional about protecting the integrity of the investigation. We release it when we believe it’s a compelling reason.”

Initially, police in Charlotte said that they could not legally release the body camera video of Scott’s shooting, citing a state law passed by the Republican legislature this year that bans the release of body-camera footage without a court order.

However, that law will not go into effect until Oct. 1, and Charlotte Mayor Jennifer Roberts said that because this shooting occurred before that date, the city does not think the video’s release is governed by the new law.

“It’s not subject to the new law,” Roberts told The Post during an interview Wednesday night in which she said she planned to view the video Thursday.

As the city recovers from a night in which peaceful demonstrations turned into violent clashes that included the smashing of storefront windows and a shooting that left one man in critical condition, officials have yet to announce whether the video of the shooting will be released Thursday, or anytime soon. Scott’s family members are expected to view the video Thursday.

“Clearly from my perspective I’d like to have it public as soon as possible,” Roberts said. “I think the community wants to see the gun and have the integrity of seeing that evidence because the stories right now are so different.”

Charlotte’s resistance to calls to release the video is not without precedent. Although the increase in the use of body cameras has led to more shootings being captured on film, most of those videos are not immediately released to the public.

Of the 706 fatal police shootings that have occurred this year, The Post has found that at least 90 have been captured by a body camera, 30 by a dash camera and 54 others were recorded at least in part by a bystander or surveillance camera (some shootings were captured by multiple types of camera).

Those numbers represent an increase from 2015, when out of 990 fatal police shootings, The Post was able to identify 71 that were captured by body camera, 14 caught on dash camera and 70 with some other type of video.

However, more fatal police shootings being caught on camera does not mean that the public is seeing more of those videos than last year.

Some videos, especially those filmed by bystanders, such as those of the fatal shootings of Alton Sterling and Philando Castile earlier this summer, are released to the public quickly. However, most body-camera and dash-camera videos depicting police shootings are not released by police departments until after the formal investigation of the incident is complete, a process that can stretch for months and in some cases years.

“Transparency is the bedrock of rebuilding trust,” said Phillip Goff, a professor at the University of California and co-founder of the Center for Policing Equity. “At a moment when public trust in police is in crisis, it’s necessary that police leaders, city leaders and community leaders put a focus on transparency.”

In some policing circles it’s considered a rule of thumb that videos showing potentially questionable shootings or that could otherwise be inflammatory should be released expediently to avoid allegations of a coverup. Earlier this week, officials in Tulsa released dash-camera footage showing the police shooting death of Terence Crutcher, an unarmed black man, just days after the shooting took place.

That conventional wisdom is derived, in part, from the backlash leveled at Chicago Mayor Rahm Emanuel (D) after his administration sat for a full year on the dash video of the shooting of Laquan McDonald, a black teenager killed in 2014. But, as recently as this week, former Chicago police superintendent Garry McCarthy defended the decision to not release the video sooner.

“If I was asked, and I was not, I would have recommended not releasing the Laquan McDonald video, for no other reason than we don’t release evidence in a criminal investigation,” McCarthy said during a speech Monday at the City Club of Chicago. “We don’t say ‘This is what we’ve got’ while the case is still pending.”

Ultimately, officer Jason Van Dyke, who shot McDonald 16 times, was charged with first-degree murder.

An October 2015 analysis by The Post found that despite vows of transparency, most police departments had developed the practice of withholding body-camera videos from the public. At the time, less than half of the fatal police shootings captured by body camera in 2015 had been publicly released — even though, in almost all cases, the officers involved had been allowed to view the camera footage while preparing their statements about the shooting. And at least 10 states, including North Carolina, passed laws limiting the public’s right to access body-camera videos.

“At a time when you’re seeing other states becoming more transparent, North Carolina is taking this tremendous step backward,” Mike Meno, spokesman for the American Civil Liberties Union of North Carolina, said Wednesday.

The violent protests and conflicting accounts in Charlotte proves “just how misguided this new law is,” Meno said, and shows why public access to such footage is crucial.

William Wan and Julie Tate contributed to this report