Amber Guyger, the white former Dallas police officer on trial for the fatal shooting of her black unarmed neighbor, testified Friday she was tired and "just ready to go home" the night she entered Botham Jean's apartment, mistaking his unit for hers, and opened fire.

Guyger, 31, sobbed on the witness stand while defense attorney Toby Shook questioned her about the moments that led up to the killing.

Guyger was still wearing her police uniform but was off duty when she entered Jean's apartment on Sept. 6, 2018 and shot him twice.

"I was scared to death," Guyger said, adding that her "heart rate just skyrocketed."

PROSECUTION RESTS IN TRIAL OF AMBER GUYGER, DALLAS COP WHO SHOT NEIGHBOR 

Guyger, who had grown up in a suburb of Dallas, said she "never wanted to take an innocent person's life."

Guyger then reenacted how she reached the apartment door she believed was hers, with her backpack, lunch box and police vest in her left hand and said she heard the sound of someone walking around inside. She testified that when she put the key into the lock she noticed the door was ajar. She then saw the silhouette of a figure and pulled out her gun and yelled, "Let me see your hands! Let me see hands!" she said.

She said she saw the figure was moving and that Jean was yelling "Hey! Hey! Hey!" in an "aggressive" voice.

She pulled out her gun and fired.

"I was scared he was going to kill me," she testified.

"I was scared he was going to kill me."

— Amber Guyger, former Dallas police officer on trial for killing unarmed black neighbor

Friday's testimony marked the first time the public has heard directly from Guyger about the events that led to Jean's death. The shooting attracted intense national scrutiny not only for the strange circumstances surrounding the case but also because it was one in a series of shootings of unarmed black men by white police officers.

Experts have said the trial's outcome could hinge on whether the jury believes Guyger's mistake was reasonable.

During opening statements on Monday, prosecutors said Guyger was distracted by a sexually explicit conversation she was having with her partner on the police force. Prosecutors said Guyer missed a series of signs she wasn't on the right floor of her apartment, including a different colored doormat and lighted numbers that contained four instead of threes on the floor below.

This Feb. 27, 2014, portrait provided by Harding University in Searcy, Ark., shows Botham Jean. Authorities said Friday, Sept. 7, 2018, that a Dallas police officer returning home from work shot and killed Jean, a neighbor, after she said she mistook his apartment for her own. The officer called dispatch to report that she had shot the man Thursday night, police said.  (Jeff Montgomery/Harding University via AP)

This Feb. 27, 2014, portrait provided by Harding University in Searcy, Ark., shows Botham Jean. Authorities said Friday, Sept. 7, 2018, that a Dallas police officer returning home from work shot and killed Jean, a neighbor, after she said she mistook his apartment for her own. (Jeff Montgomery/Harding University via AP) (Harding University)

Dallas Det. Stephen Clearly also pointed out that Guyger's apartment had a wooden board displaying photos hanging on a wall, a bookshelf in the corner and a small table with a vase of flowers against the wall. Jean's apartment did not. Jean had art hanging on the wall behind the couch, an ottoman in the living room and a workstation set up near the bar.

Prosecutors claimed that Guyger was so wrapped up in her steamy texts that she went into auto-pilot mode, shooting Jean, who was sitting in his living room eating a bowl of ice cream.

In a frantic 911 call played in court earlier this week, Guyger was heard saying, "I thought it was my apartment" nearly 20 times.

Texas Ranger David Armstrong testified that about a quarter of the 300 residents that investigators had interviewed at Guyger's apartment complex said they had previously put their keys in the wrong door.

CLICK HERE FOR THE FOX NEWS APP

Guyger, a four-year veteran of the Dallas Police Department, was initially charged with manslaughter three days after the shooting. Two months later, she was indicted by a grand jury on a murder charge. She has pleaded not guilty.

If the jury finds her guilty of murder, Guyger could face life in prison. If she is found not guilty of murder, she could still face lesser charges of manslaughter or criminally negligent homicide.

The Associated Press contributed to this report.