The former Dallas police officer standing trial for murder in the shooting death of her neighbor broke down in tears as she testified in her own defense Friday morning. Amber Guyger began crying and trembling as she recalled approaching her neighbor Botham Jean's door before fatally shooting him.

Guyger has said she thought Jean's apartment was her own when she opened his door and shot him, mistaking him for a burglar. After an attorney prompted her to come down from the stand to demonstrate how she opened Jean's door, Guyger began sobbing uncontrollably, prompting a judge to call a brief recess.

Guyger, who is white, was returning home from a 13-and-a-half hour shift and was off duty but still in uniform when she shot Jean, a St. Lucia native who was black and worked as an accountant. Guyger was later fired and charged with murder.

Get Breaking News Delivered to Your Inbox

Her testimony in court Friday marked the first time the public has heard directly from the 31-year-old former officer about her account of events.

Taking the stand just before 9 a.m., Guyger admitted she had exchanged explicit texts with her Dallas police partner, Martin Rivera, earlier the day she shot Jean. She said she was on the phone with Rivera when she drove to what she said she believed was the third floor of her apartment building's garage and parked. Guyger had actually parked on the building's fourth floor, where Jean lived directly above her. She testified the levels of the parking garage were not clearly marked.

Guyger denied that she had plans to meet Rivera at her apartment that night, as the prosecution had suggested in opening arguments. She said Rivera had never been to her apartment. Rivera, she said, typically called her, but she never called him because "I knew it was wrong and I never knew where he was."

When a defense attorney asked whether Rivera was married, she replied, "Yes."

When court resumed, Guyger appeared composed. She testified that she returned to what she thought was her own apartment to find the door ajar and heard "shuffling," and felt "pure fear" because she thought an intruder was inside. She said she opened the door and saw a "silhouette" approaching her. She said she yelled, "Show me your hands" twice and opened fire because the figure was "coming at me" and she couldn't see his hands.

"I was scared he was going to kill me," Guyger said.

Later, she began sobbing again when she was asked to describe how she felt about shooting Jean.

"I feel like a terrible person. I feel like a piece of crap," Guyger said. "I hate that I have to live with this every single day of my life."

Guyger said she's asked God for forgiveness and said she feels like she doesn't deserve to be with her family and friends.

"I wish he was the one with the gun and he killed me," Guyger said through tears. "I never wanted to take an innocent person's life. I am so sorry."

Defense attorneys have argued that the layout of the Dallas apartment complex was confusing and that it wasn't unusual for residents to mistake others' apartments for their own. But prosecutors have said Guyger overlooked numerous indicators that she was in the wrong place and suggested she was distracted by the sexual exchanges with Rivera.

On cross-examination, Dallas County prosecutor Jason Hermus questioned Guyger's assertion that she had stopped a sexual relationship with Rivera because he was married and she thought it was "morally wrong." Hermus emphasized that Guyger was still exchanging sexual text messages with him, including nude photographs.

"Your moral code puts sex off-limits, but everything else is fair game?" Hermus asked.

"I did do that," Guyger said, admitting to sending the pictures.

Guyger admitted she later deleted the text exchanges, which she said she usually did.

"I was ashamed I was in a relationship with him," Guyger said. "It's embarrassing."

Prosecutors have argued Guyger never faced a threat from Jean, who was sitting on his couch eating a bowl of ice cream when Guyger entered. Hermus honed in on Guyger's assertion that she was scared during the encounter, asking her if she could imagine the fear Jean must have felt. Hermus emphasized that Guyger could have chosen to take cover rather than opening fire.

Prosecutors have also asserted that Guyger should have done more to try and help Jean after she shot him, but was more concerned about herself, repeatedly telling a 911 operator she was going to lose her job. Guyger said she tried to help Jean by doing chest compressions and performing a "sternum rub" to try to keep him conscious.

On cross-examination, she admitted she was using one hand to perform the chest compressions while calling 911 with the other. She also admitted she stopped the life-saving efforts to go outside and meet the responding officers, and said she texted Rivera once the other officers told her to go outside.

"When you went out into the hall, you chose to do that even though you knew you should be giving that man life-saving treatment?" Hermus asked.

"Yes, sir," Guyger replied.

Guyger finished her testimony Friday afternoon, after which the defense called a series of witnesses who lived in the same apartment complex and had gone to the wrong apartment by mistake.

Then, with the jury out of the courtroom, the prosecution and defense wrangled over what kind of testimony would be allowed from Texas Ranger Sargeant David Armstrong, the lead investigator on the case. The judge ruled that Armstrong could tell the jury in general about what kinds of physical sensations a police officer might experience when confronting a deadly threat, but could not opine about the reasonableness of Guyger's actions.

Armstrong previously testified outside the jury's presence that he felt Guyger's use of force was reasonable and that she did not commit a crime.

Court was expected to resume on Saturday.