The former policeman believed Smith was armed, defense attorneys said, and a gun was found in the car. But prosecutors argued Stockley planted the weapon and that the gun had only Stockley's DNA on it.
Police fired tear gas and rubber bullets during clashes with protesters in St Louis early on Saturday after a white former policeman was acquitted of murdering a black suspect.
A peaceful rally over Friday's not guilty verdict turned violent after police confronted a small group of demonstrators - three years after the shooting of another black suspect in the nearby suburb of Ferguson stirred nationwide anger and debate.
Officers fired tear gas as people broke windows at a library and two restaurants and threw bricks and water bottles at officers. Protesters also threw rocks and paint at the home of St. Louis Mayor Lyda Krewson, said Acting Police Commissioner Lawrence O'Toole.
Nine city officers and a state trooper were injured and at least 23 people were taken into custody, he said.
TRT World's Ben Said has more.
Jason Stockley, 36, was acquitted of first-degree murder for killing Anthony Lamar Smith, 24. The former policeman, who was arrested in May 2016, was accused of planting a gun in Smith's car but testified he acted in self-defence.
After the verdict, about 600 protesters marched in downtown St. Louis, chanting "No justice, no peace" and "Hey hey! Ho ho! These killer cops have got to go!"
Some protesters held signs that read "Black Lives Matter" and "No more racist killer cops."
Others said they planned to move the protest later in the evening to the city's popular restaurant neighborhood, the Central West End.
"I’m sad, I’m hurt, I’m mad,” the Reverend Clinton Stancil of the Wayman AME Church in St. Louis said by telephone. “We haven’t made any progress since Ferguson, that’s clear. Cops can still kill us with impunity."
Mayor Lyda Krewson and Governor Eric Greitens, who put the National Guard on standby, appealed for calm.
Local schools closed early and businesses shut down.
"Frustration, anger, hurt, pain, hope and love all intermingle," Krewson said in a statement. "I encourage St. Louisans to show each other compassion."
Al Watkins, an attorney for the mother of Smith's daughter, Christina Wilson, said his client was appalled by the decision.
He said the ruling showed prejudice, pointing to a line where the judge wrote that an "urban heroin dealer" without a weapon would be an anomaly.
Judge Timothy Wilson's highly anticipated ruling was announced more than five weeks after the bench trial ended.
"This court, as a trier of fact, is simply not firmly convinced of defendant's guilt," he wrote in his ruling.
Wilson said prosecutors also asked the court to consider a lesser degree of homicide but they did not prove beyond a reasonable doubt that Stockley's use of deadly force was not justified in self-defence.
Stockley's attorney, Neil Bruntrager, said the ex-officer on Friday was relieved and would seek to rebuild his life. “It’s been a long road for him,” Bruntrager said.
"This ain't right"
In recent years grand juries have declined to charge officers involved in the 2014 fatal shooting of Michael Brown, 18, which set of nights of violent protest in Ferguson, and the choking death of Eric Garner, 43, in New York.
Baltimore police officers also were not convicted in the case of Freddie Gray, who died from a broken neck suffered in a police van in 2015.
Brown's father, Michael Brown Sr., voiced his frustration after Friday's verdict.
"You all know this ain't right and you all continue to do this to us," he told a St. Louis Fox television station. "Like we don't mean nothing, like we're rats, trash, dogs in the streets. Right now, I'm praying for my city because my people are tired of this."
Prosecutor Kimberly Gardner said she was disappointed with the verdict and called on protesters to avoid violence.
“I understand the verdict has created anger and frustration for many in our community," she told reporters at the courthouse. "I am frustrated as well. Destruction of our community is not the answer."
Smith tried to flee from Stockley on December 20, 2011, following an alleged drug deal, authorities said. During the pursuit, Stockley could be heard saying on an internal police car video he was going to kill Smith, prosecutors said.
At Stockley's direction, the driver of the police car slammed into Smith's vehicle and they came to a stop, court documents said. Stockley then approached Smith's car and shot him five times with his service weapon.
Stockley's lawyers said he fired in self-defence, believing Smith was reaching for a gun. But prosecutors said the only gun recovered from the scene had only Stockley's DNA on it.
Stockley waived his right to a jury trial, allowing the judge to decide. He left the St. Louis Metropolitan Police Department in 2013 and was arrested last year.
Smith's family settled a lawsuit against the city for $900,000 in 2013, Watkins said.