A witness who delivered key testimony in the trial of Amber Guyger — the white former Dallas police officer convicted this past week in the murder of an unarmed black man, Botham Jean — was fatally shot on Friday night, a lawyer for Mr. Jean’s family said.

The witness, Joshua Brown, 28, who had lived in the same apartment complex as Ms. Guyger and Mr. Jean, was shot several times by an unknown assailant, Lee Merritt, the family’s lawyer, said on Twitter Saturday night.

Mr. Brown’s death occurred just two days after a Dallas County jury sentenced Ms. Guyger to 10 years in prison, well short of the maximum 99 years that she could have received in the killing of Mr. Jean, a 26-year-old immigrant from the Caribbean island nation of St. Lucia.

The sentence was seen as inadequate by some social justice advocates, who saw the trial as another example of white police officers being held to a different standard than people of color.