A former police officer in East Pittsburgh, Pa., was acquitted Friday on all counts in connection with the shooting death of a black teenager who fled during a traffic stop last summer.

The verdict in the death of Antwon Rose II came after a four-day trial in downtown Pittsburgh and less than four hours of jury deliberation. The city had been concerned about protests and had cordoned off streets around the massive, gothic Allegheny County Courthouse during the trial.

A video that recorded the fatal shooting was widely viewed on the internet, and it led to days of protests in Pittsburgh and drew widespread attention as another example of the killing of an unarmed black man by a police officer.

The officer, Michael Rosfeld, who is white, had been charged with homicide in the shooting death of Antwon, a 17-year-old African-American, on the night of June 19, 2018. Prosecutors charged Mr. Rosfeld with an open count of homicide, meaning the jury could have convicted him of murder or manslaughter.