A white Dallas police officer who said she mistook a neighbor’s apartment for her own and fatally shot him in his living room was sentenced Wednesday to a decade in prison in a stunning courtroom scene that included the dead man’s brother and the black judge embracing the sobbing officer.

People outside of the courtroom reacted angrily to the sentence given to Amber Guyger in the death of Botham Jean, believing it was too lenient. But Jean’s brother addressed her directly from the witness stand.

Brandt Jean told Guyger that his brother would have wanted her to turn her life over to Christ, and that if she asks God for forgiveness, she will get it.

“I love you as a person. I don’t wish anything bad on you,” he said to the 31-year-old Guyger, before asking the judge, “I don’t know if this is possible, but can I give her a hug?”

The judge said he could, and Brandt and Guyger stood up, met in front of the bench and embraced while Guyger cried. Judge Tammy Kemp also hugged Guyger before she was led from the courtroom.

The shooting in September 2018 drew widespread attention because of the strange circumstances and because it was one in a string of shootings of unarmed black men by white police officers.

Guyger, who was arrested three days after the shooting and later fired, was convicted of murder Tuesday. Jurors could have sentenced her to up to life in prison or as little as two years, but prosecutors asked them to send her to prison for 28 years, which is how old Botham Jean would have been if he were still alive.

She will be eligible for parole in five years, after serving half of her sentence.

As video of the dramatic hearing circulated online, critics blasted the judge, saying her hug was inappropriate for the jurist overseeing the case. Meanwhile at a Dallas church where the Jean family gathered to worship and Botham Jean used to lead congregation singing, video of Brandt Jean embracing Guyger in court drew applause and “amens” when showed Wednesday night.

Dallas County District Attorney John Creuzot, a former trial judge, called Brandt’s embrace of Guyger “an amazing act of healing and forgiveness that is rare in today's society ... especially for many of our leaders.”

If Jean’s 18-year-old brother “can heal and express healing in that fashion, in his words and in his deeds, I would hope that the greater community, not just Dallas but all of Texas and all of the United States, could gain a message from that,” he told reporters.

Dallas Mayor Eric Johnson issued a statement saying he would “never, ever forget the incredible examples of love, faith and strength personified by Botham, Brandt and the entire Jean family.”

Dozens of demonstrators marched through parts of downtown Dallas on Wednesday night to protest the sentence, which they criticized as too lenient. The marchers chanted “No justice, no peace; no racist police” and “Amber alert!” One woman was taken into custody after she appeared to disregard police orders not to obstruct traffic.

Guyger’s attorney had asked jurors to show mercy, pointing to the good she did for people, including some who spoke at the sentencing hearing.

Among them was officer Cathy Odhiambo, who described Guyger as a longtime friend who dreamed of being a police officer when they waited tables at a TGI Fridays. She said the two of them went through the academy and then came through the police ranks together.

“Everybody that knows her knows that Amber is the sweetest person,” Odhiambo said.

Odhiambo, who is black, was not asked about text messages that prosecutors said indicated a lack of sensitivity by Guyger toward black people. However, another fellow officer, Thomas MacPherson, said some of those texts sounded “out of character” for Guyger, whom he described as “someone you could depend on.”

When a sniper opened fire on police during a rally in downtown Dallas three years ago, killing five of them, Guyger was “so brave,” MacPherson said. He said the two of them ran toward the gunfire and helped panicked citizens along the way.

LaWanda Clark, who is black, said she met Guyger when the former officer busted a drug house, and that it helped change her life. She was struggling with a crack cocaine addiction. Guyger, while ticketing her, told her it could be the catalyst for turning around her life. She said Guyger treated her as a person, not an addict, and that she’s now sober.

As Clark spoke, Guyger’s lawyers showed jurors a photo of Guyger attending Clark’s graduation from a community drug treatment program.

Jean’s father told jurors about how his son’s death upended his life back in St. Lucia.

Bertrum Jean said that after his son left their Caribbean island for college in Arkansas, he would call home every Sunday after church to catch up with the tightly knit family. Now, he said, his Sundays “have been destroyed.”

“How could we have lost Botham? Such a sweet boy. He tried his best to live a good honest life. He loved God. He loved everyone. How could this happen to him?” the father said, breaking into tears.

Speaking to reporters after the hearing, Jean’s mother, Allison Jean, criticized the investigation into her son’s death and the police training to shoot to kill.

If Guyger “was trained not to shoot in the heart, my son would be alive today. He was no threat to her. He had no reason to be a threat to her, because he was in his own apartment,” Allison Jean said.

The basic facts of the shooting were not in dispute. Guyger, returning from a long shift that night, parked on the wrong floor and mistook Jean’s apartment for her own, which was directly below his. Finding the door ajar, she entered and shot him, thinking he was a burglar. He had been eating a bowl of ice cream before she fired.

In the frantic 911 call played repeatedly during the trial, Guyger said "I thought it was my apartment" nearly 20 times. Her lawyers argued that the identical physical appearance of the apartment complex from floor to floor frequently led to tenants going to the wrong apartments.

But prosecutors questioned how Guyger could have missed numerous signs that she was in the wrong place. They also asked why she did not call for backup and suggested she was distracted by sexually explicit phone messages she had been exchanging with her police partner, who was also her lover.

The jury was largely made up of women and people of color.

Associated Press video journalist John Mone and writer Jamie Stengle in Dallas, and writer Jill Bleed in Little Rock, Arkansas, contributed this this report.