Amber Guyger, the former Dallas police officer convicted of murder for fatally shooting her unarmed neighbor in his apartment, was sentenced Wednesday to 10 years in prison.

Guyger, 31, learned her fate after a sentencing hearing that included emotional testimony from the family of victim Botham Jean and revelations that she shared racist and offensive texts and social media posts.

Prosecutors had asked jurors to sentence Guyger to at least 28 years — symbolic because Jean would have turned 28 last Sunday.

Guyger did not testify during her sentencing but has the opportunity to appeal the conviction in the unique case that has gripped the city of Dallas and shattered the idea that law-abiding citizens can be safe in their own homes.

The jury was allowed to consider whether Jean's death was the result of "sudden passion," which meant Guyger acted in the heat of the moment. It carried a lesser sentence of two to 20 years behind bars.

The five-year police veteran lived one floor below Jean, a 26-year-old accountant, in their apartment complex. She testified that she was off-duty but in uniform when she mistakenly entered his unit on Sept. 6, 2018, after a long shift at work, believed he was a burglar and shot him in the chest, saying she feared for her safety.'

Guyger is white and Jean was black, and his death stoked protests, led to Guyger's firing and renewed conversations about police use of force and racial bias.

During the sentencing hearing Wednesday, Guyger's mother, Karen Guyger, 66, testified about her daughter's life and said that her then-boyfriend had molested Guyger when she was 6.

She said she reported it to the police and he was arrested. NBC News was unable to immediately learn the outcome of the case.

Karen Guyger added that her daughter was distraught after killing Jean.

"She feels very bad about it," Karen Guyger said through tears.

Dallas County prosecutors built a case through Guyger's police disciplinary records, texts and social media posts to speak to her character and argue they conveyed she is undeserving of a lenient sentence.

Jurors were shown three Pinterest posts that Guyger had saved to her account and commented on. They included the picture of a military sniper with text that read: "Stay low, go fast; kill first, die last; one shot, one kill; no luck, all skill."

In another Pinterest post, Guyger commented under a picture of a Minion from the movie "Despicable Me": "People are so ungrateful. No one ever thanks me for having the patience not to kill them," the comment read.

New texts were also shown to jurors between Guyger and her married work partner, Officer Martin Rivera, with whom she had been having an affair. Prosecutors had revealed their sexually explicit texts during the trial, although the defense downplayed them, saying the two were already "ramping down" their relationship by the time the shooting occurred.

Rivera texted in March 2018 to Guyger: "Damn I was at this area with 5 different black officers !!! Not racist but damn."

She responded: "Not racist but just have a different way of working and it shows."

Guyger texted with another officer last year about Dallas' Martin Luther King Jr. parade.

"When does this end lol," the officer wrote to Guyger.

"When MLK is dead … oh wait …," she joked.

Two days before Guyger fatally shot Jean, she texted with someone who had adopted a German Shepherd.

The dog's owner wrote of the animal: "Although she may be racist."

Guyger responded, "It's okay .. I'm the same," and later added: "I hate everything and everyone but y'all."

During the sentencing phase, defense attorney Toby Shook asked the jury to think about how Guyger helped others as an officer, and largely glossed over the derogatory texts that prosecutors had introduced earlier.

"Through these horrible series of events, she went into his apartment by mistake," Shook said. "She pulled that trigger in an instant — an instant she will regret for the rest of her life. ... She didn't go there seeking to kill him."

Jean was watching television and eating a bowl of vanilla ice cream in his living room just before 10 p.m. when Guyger burst inside, likely scaring him, prosecutors said at trial. Guyger testified that she used her electronic key fob in the lock, but the door still pushed open, and she immediately drew her service weapon once inside.

The trajectory of the bullet showed that Jean was either getting up from his couch or cowering when Guyger fired at him, the prosecution said.

Jean's mother, Allison Jean, testified Tuesday that she still struggles with the trauma of his death. Jean was a native of the island nation of St. Lucia and moved to Dallas for a job with PricewaterhouseCoopers.

"I cannot sleep. I cannot eat," Allison Jean told the courtroom. "It's just been the most terrible time for me."

The jury, made up of mostly women and people of color, deliberated for about five hours to convict Guyger and has been sequestered during this trial, which began on Sept. 23.

Guyger was taken into custody at the end of the first day of the sentencing phase, which started after the verdict was read Tuesday. She was booked into the Dallas County jail.