In the moments after the sentence was announced, protesters shouted chants of “no justice, no peace” in the courthouse hallways. But when Botham Shem Jean’s brother took the stand to address Amber R. Guyger, the former Dallas police officer who fatally shot Mr. Jean in his own apartment, he offered only forgiveness.

“I wasn’t going to ever say this in front of my family or anyone, but I don’t even want you to go to jail,” the brother, Brandt Jean, said, before getting up to wrap his arms around Ms. Guyger. “I want the best for you.”

On Wednesday, a Dallas County jury sentenced Ms. Guyger, who is white, to 10 years in prison in a case that was one of the latest, and also one of the most unusual, in a series of high-profile confrontations between police officers and unarmed black men across America.

The jury deliberated for about an hour and a half before deciding upon a sentence that was well short of the maximum 99 years in prison Ms. Guyger could have received — but also longer than the two years jurors might have imposed.

Prosecutors had asked for a prison term of no shorter than 28 years, the age that Mr. Jean, whose birthday fell during the trial, would have been if he were alive today.

The trial displayed the complicated reality of race, policing and justice in America. But the circumstances of the case were unusual from beginning to end, including the moment when Mr. Jean’s brother took the witness stand and asked the judge for permission to hug Ms. Guyger in the courtroom.