(CNN) What started as a protest over the death of a Memphis man devolved into chaos after demonstrators threw bricks at police and vandalized squad cars, officials said.

At least 36 officers and deputies were injured in the melee Wednesday night, police said Thursday. All those hospitalized have been released. Three people have been charged with disorderly conduct and one of them also with inciting a riot.

The turmoil came after US marshals shot and killed a man Wednesday night in the north Memphis neighborhood of Frayser, officials said.

Marshals were trying to stop 20-year-old Brandon Webber, who was wanted on multiple warrants, outside a home as Webber was getting into a vehicle, the Tennessee Bureau of Investigation said. The warrants pertained to a June 3 incident in Hernando, MIssissippi, the bureau said.

Webber "reportedly rammed his vehicle into the officers' vehicles multiple times before exiting with a weapon," the bureau said. "The officers fired striking and killing the individual. No officers were injured."

News of Webber's death spread quickly as protesters hurled rocks at police, tore down a concrete wall outside a business and smashed the windows of squad cars and a fire station.

Why the US Marshals were trying to arrest Webber

The US marshals involved in Wednesday's incident were serving a warrant on behalf of police in Hernando, about 25 miles south of Memphis. Webber was wanted for allegedly shooting a man in Hernando and stealing his car, officials said.

Webber had answered a social media ad regarding a vehicle, John Champion, district attorney for Mississippi's 17th Circuit Court, told reporters Thursday.

Webber and the man selling the car went on a test drive on June 3 and while they were switching places Webber shot the victim five times, Champion said.

The car's owner identified Webber in a photo lineup and Mississippi authorities contacted marshals on June 8, asking them to make an arrest.

The Hernando warrants were for aggravated assault, armed robbery and conspiracy to commit armed robbery, Champion said.

Authorities say that Webber was driving a red Infiniti during Wednesday night's incident -- the same vehicle stolen in the Hernando crime.

Hernando authorities say there is another suspect in the June 3 incident. That individual allegedly drove Webber to Memphis.

Protesters unleash anger toward a different agency

Police in Memphis said upset residents misdirected their anger.

"For some reason, they turned their anger toward the Memphis Police Department."

A squad car was damaged in the protests Wednesday in the north Memphis neighborhood of Frayser.

The police director and mayor lauded Memphis officers for keeping their composure despite coming under attack.

"I'm impressed by their professionalism and incredible restraint as they endured concrete rocks being thrown at them and people spitting at them," the mayor said.

The police director also praised the protesters who remained peaceful or tried to quell the violence.

"I know that there are many individuals in the crowd that tried to assist in keeping everyone calm," Rallings said.

'The neighborhood is victimized'

Police retreat under a cloud of tear gas as protesters disperse from the scene in Frayser.

Residents aired their grievances in Memphis' Frayser neighborhood after news broke of another black man killed by law enforcement.

According to the US Census Bureau, the ZIP code that includes most of Frayser is about 80% black, and more than four in 10 residents live below the poverty line.

Webber was a 2017 graduate of Central High School, which said it was deploying extra security and grief counselors across the school district.

"My heart is broken over the news regarding the death of Brandon Webber," Central principal Greg McCullough said. "I remember that he was a very talented art student. He seemed to really love his experience at Central High and he engaged well with others."

Shelby County Commissioner Tami Sawyer tweeted that she went to Frayser shortly after the shooting because "this is my district. I went because I stand with my people. People are hurting."

"Don't judge Frayser without asking a community how it feels to mourn their youth over and over again," Sawyer tweeted . "What do people do with their pain and trauma when it gets to be too much, when a city has ignored them, when their loss is too great and they can no longer yell at the sky?"

But Rallings, who is black, said the police department welcomes peaceful protests. It's when demonstrations turn violent that protesters end up hurting their own community, he said.

"When these (acts) of violence happen in a neighborhood, the neighborhood is victimized," Rallings said.

"My message tonight is we should all wait and make sure that we know what exactly happened before we spread misinformation, or we jump to conclusions. ... We know there's a lot (of rumors) out there, and often individuals do not have the facts. And I think that's dangerous."