The shooting death of a 20-year-old black man in Detroit by a federal agent last week spurred protests and community meetings in the city, where anger has long simmered over police brutality, but community leaders say they hope the situation will not boil over into the sort of destructive rioting and looting seen recently in Baltimore and Ferguson.

Terrance Kellom was wanted for armed robbery when an Immigration and Customs Enforcement (ICE) agent — and a member of an interagency task force in Detroit — shot and killed him at his home. A police report said Kellom lunged at agents with a hammer, though his father said that wasn't true. Seven spent shell casings were found at the scene, and authorities have refused to release Kellom's autopsy report.

Tensions ran high at the ensuing protests, and authorities said they were on the brink of losing control. "They came real close to crossing the line and getting arrested," Police Chief James Craig said Thursday after video surfaced of an unruly demonstration.

Eric Shelley, the spokesman for the group Michigan United, told VICE News that some protesters were "on the edge of crossing the line," with some in the crowd "almost challenging the police," but the situation never got completely out of hand.

"You could see the tensions take a step back," Shelley said. "Like Martin Luther King said, riots are the language of the voiceless, so giving the people more voice would perhaps reduce the risk of danger."

After more than 47 fatal shootings between 1995 and 2000, including six of unarmed suspects, Detroit entered into two consent judgments with the Justice Department in 2003 that kept a federal monitor watching over the city's police department until 2014. A civilian police commission was also created to oversee the department.

'I don't think the tendency here would be to go out and burn and loot and shoot.'

Ron Scott, spokesman for the Detroit Coalition Against Police Brutality, called it "the strongest police commission in the country," and told VICE News that the city's long history of activism and organization has helped maintain order even as the community's anger over Kellom's death has steadily risen.

"This is the city that originally had Black Power and the largest civil rebellion in the country in 1967," Scott said. "I don't think the tendency here would be to go out and burn and loot and shoot. There are a lot of things that people are going through right now we've been through."

According to experts, a city's history is just one factor that influences whether public outrage over allegations of police misconduct erupts into destruction. John Roman, a senior fellow at the Urban Institute, told VICE News that such outcomes are also shaped by the government's ability and willingness to communicate with residents, take their grievances seriously, and deliver justice.

"If you build trust in police, dedicate resources to monitoring police, and engage citizens in a proactive way, you're much less likely to get into these situations," Roman said. "If citizens don't trust the police, the police don't have accountability mechanisms, and the police take a tough approach to policing, you're much more likely to get into these situations and having an enormously hard time getting out of them."

To explain the dynamics, Shelley cited the case of Floyd Dent, a Detroit resident who was beaten by a suburban police officer during a routine traffic stop earlier this year. Prosecutors dropped drug charges against Dent after video emerged showing Officer William Melendez hitting him 14 times in the head. Melendez was fired and now he and another officer face criminal charges in connection with the case.

"Something that's overlooked is the effect of justice," Shelley said. "You have the riots in the Baltimore that seemed to calm down when the officers were charged."

In response to Kellom's death, Shelley and Scott have been organizing community meetings with Police Chief James Craig and the US Attorney's office in Detroit to discuss the case and broader issues of police brutality and accountability. They've also been working to restore power to the police commission, which lost its oversight powers in 2013 when Michigan's governor appointed an emergency manager to oversee the city's financial operations.

"We are trying to keep police accountable," Shelley said. "On Friday we intend to go to ICE and ask for a full investigation and see if we can do something about this multijurisdictional task force."

That type of community organizing and dialogue between government and citizens is essential to avoiding the type of explosive riots seen elsewhere in recent months, Brian Jackson, director of safety and justice program at the RAND Corporation, a nonprofit think tank, told VICE News.

"The issue of police-community trust is how the social capital gets built up so when something does happen… there's a presence of those community groups and touch points between the community and police to work through the process to make sure everyone is satisfied that events are being dealt with in a fair and impartial way," Jackson said.

Although federal oversight of Detroit's police has ended, Scott said the way the city handles allegations of police misconduct has improved. And even when the public feels a grievance hasn't been properly addressed, there are mechanisms in place to coordinate a response.

"What we're trying to do is to make sure we have a different type of way to resolve issues," Scott said. "We are in a situation where we have a number of organizations apply pressure when necessary."

Still, Scott said that things could get ugly in Detroit if protests ever turned violent. He called the city a "burgeoning police state" full of federal agents and heavily armed officers, and said there is resentment over "corporate policing" in the form of private security firms hired by Quicken Loans and other corporations headquartered locally.

"I don't want to create havoc, but if there's an insurrection here, they're not going to burn up a CVS," Scott said. "There might be a shootout."

He emphasized the unlikelihood of that scenario, but said if it did happen it would "be more highly organized and orchestrated than what we've seen before." Ultimately, however, the activist leader said most people in Detroit trust that organizations like his will see that justice is served without individuals feeling the need to take matters into their own hands.

"They respect some of us who have been out here a long time to get justice," Scott said. "We've dealt with numerous cases and been successful in getting justice in those cases, and they trust us to do what we have to do to work with everybody else."