City officials here promised to outfit the entire police department with body cameras Wednesday, seeking to defuse tension over a graphic video showing a white officer fatally shooting an unarmed black man in the back.

Their attempts to reassure the public came as footage of the incident was replaying endlessly online and on cable news, and they showed how urgently authorities are trying to avoid frenzied protests like those seen in Ferguson, Mo., last summer.

“The community is very angry about it, so it is important to calm the community before things get out of hand,” said James Johnson, president of the local chapter of the civil rights group National Action Network. “We don’t want another Ferguson here.”

Since last summer, the long shadow of Ferguson has extended over city after city, as incidents in New York, Cleveland and Madison, Wis., have sparked demonstrations and outrage over how police officers use force toward black men and boys. This week, that focus turned to North Charleston, the third-largest city in South Carolina, a place with more black residents than white that is patrolled by a predominantly white police force.

As the images of Michael Slager firing a series of shots into the back of Walter Scott spread widely, city officials moved quickly to announce that the officer has been fired and would be charged with murder. While there have been some protests since the video’s release, they have not reached the fever pitch seen elsewhere. Mayor R. Keith Summey said his city has not turned into another Ferguson “because we did what is right.”

“We turned the investigation over to an independent agency,” Summey said at a news conference Wednesday. “We gave them everything that we have.”

City leaders, legal observers and activists said the quick action in North Charleston spoke to a key lesson from Ferguson: Act with urgency to try to keep the peace.

“I think we’ve all seen what happened when you seem to have clear facts and the authorities don’t move for a long time,” said David A. Harris, a law professor at the University of Pittsburgh. “It’s not good for anybody. That’s the lesson of places like Ferguson.”

In the days after Ferguson police officer Darren Wilson shot and killed Michael Brown, an unarmed 18-year-old, residents criticized how slowly police released basic information like Wilson’s name, while the grand jury process was slower than usual because of the way prosecutors showed evidence to jurors. Ultimately, the grand jury and the Justice Department opted not to bring any charges against Wilson.

“If you have compelling evidence and, by the way, the public has all seen it, maybe the lesson of earlier cases is let’s move,” Harris said. “No sense in waiting around for people to simply get angry.”

Officials in other cities have made efforts to offer rapid public statements of contrition with calls for peace before and after Ferguson erupted. In New York, after a police officer was videotaped placing Eric Garner in a chokehold before Garner died, the police chief and mayor quickly spoke out about that high-profile incident. Earlier this year, amid heavy protests in Madison, leaders there also tried to reassure the public in the wake of the shooting.

Even as North Charleston officials were publicly contrite, questions still lingered over the shooting and how authorities would have responded had this footage never been found. Slager’s initial account, which he relayed to a dispatcher, was: “Shots fired and the subject is down, he took my Taser.” A lawyer who had represented Slager had said that the officer “felt threatened” after Scott tried to overpower him; the lawyer said he no longer represents Slager, and it is unclear whether he has new legal representation.

When a police department does not resemble the community it serves

“It would have never come to light,” Scott’s father, Walter Scott Sr., told the “Today” show . “They would have swept it under the rug, like they did with many others.”

The bystander who shot the cellphone video and gave it to the Scott family told NBC News on Wednesday night that Scott appeared to be running away from the Taser when he was shot.

“I remember the police [officer] had control of the situation. He had control of Scott, and Scott was trying just to get away from the Taser. You can hear the sound of the Taser.” Feidin Santana told the network.

A few dozen protesters gathered outside the North Charleston city building on Wednesday morning, carrying signs and crying chants that became familiar in other cities across the country.

“We’re out here for justice. We’re out here because black lives matter,” said Jeremy Johnson, 21.

Like many who showed up to demonstrate, Johnson said he was appalled, but not surprised, by the video of Scott’s death. Racial profiling and police impunity are just the reality for him and other black Americans, he said.

Another leader said the quick action would help show residents that justice was served.

“What happened in Ferguson is totally different from what happened here in that it took so long for any measures to happen, that there wasn’t any video present,” said Michael Brown, one of three black members on the North Charleston City Council. “In this one, there was quick action.”

Summey’s decision to order body cameras for every member of the department reflected the importance of video footage in this case. Still, officials have not commented about whether Sla­ger’s account would have been questioned without the video, which offered an undeniably different narrative.

“I have watched the video, and I was sickened by what I saw,” Eddie Driggers, the police chief, said Wednesday.

Scott’s mother, Judy, said in an interview with reporters outside her home that she was “broken” watching her son run on the video.

“We’re talking about cameras on the policemen,” she said. “It’s a shame that you have to do that, because the policemen are supposed to protect us — we’re supposed to be able to trust them.”

Still, she insists that she has faith in the justice system. And she said she still believes there are good police officers.

“There are faithful and truthful people, and God has a way to make them do the right thing,” she said.

The family gathered again Wednesday night in the family living room to watch the national news, at times gasping and sighing as the video of Scott’s death flashed on their television. Midway through one of the broadcasts, Judy Scott had to leave to go finalize her son’s burial plot.

Summey and Driggers said they visited Scott’s family on Wednesday morning and promised a police escort for his funeral.

“We let them know how we felt about their loss and how bad it was, and we do not condone wrong,” Summey said.

Diggers added: “I have been praying for peace for the family and peace for the community.”

Experts warned that the video began after the confrontation was underway, making it impossible to know what happened before the taping started and what kind of defense Slager could mount.

In 1985, the Supreme Court ruled in Tennessee v. Garner that police could shoot at a fleeing violent felon who poses a significant threat to others.

“There’s no indication in this video I can see that it would have been necessary to shoot to prevent escape. . . . It’s not merely that the individual is fleeing, it’s that the use of deadly force is necessary to prevent escape,” said David A. Klinger, a former police officer and criminology professor at the University of Missouri at St. Louis.

Slager was one of two South Carolina officers arrested Tuesday by the South Carolina Law Enforcement Division, which is investigating the North Charleston shooting. The other man, Justin Gregory Craven, shot and killed a black man after a car chase last year, and he was charged with firing a gun into an occupied vehicle.

The State newspaper in Columbia, S.C., reported last month that police there had shot at more than 200 people over the past five years; only a handful were charged with a crime, while none were convicted.

Meanwhile, as Slager remains in the Charleston County jail, his wife is eight months pregnant. Summey said Wednesday that she will remain on the city’s health insurance plan until after she delivers her baby.

“We think that’s the humane thing for us to do,” he said.

Berman reported from Washington.