ST. PAUL — Last summer, only seconds after watching a Minnesota police officer shoot her boyfriend during a traffic stop, Diamond Reynolds pulled out her phone and started recording.

Shaken but steady, Ms. Reynolds told viewers on Facebook Live all that she had seen. As her camera rolled, she told the police officer, whose gun was still pointed into the car, that her boyfriend had meant no harm and had been trying to cooperate. And she checked on her 4-year-old daughter, who had watched the shooting from her booster seat in the back of the Oldsmobile.

Within hours, millions had watched her video, and the death of Ms. Reynolds’s boyfriend, Philando Castile, was international news.

This week, the officer, Jeronimo Yanez, is on trial for second-degree manslaughter, and Ms. Reynolds, 27, is back in the spotlight.

From the witness stand on Tuesday, she recounted the moment last July 6 when Officer Yanez, 29, began shooting, and dabbed away tears as prosecutors played a police dashboard-camera video from the encounter — as well as the video Ms. Reynolds had captured from inside the car.

“I felt broken, hurt, confused, lost,” Ms. Reynolds told the 15 jurors, at least two of whom also wiped their eyes as they watched the videos.

Ms. Reynolds spent hours on the stand, starting late Monday and continuing through much of Tuesday morning. She said that she had reached for her phone and started recording because she feared Officer Yanez might also hurt her or her daughter, and that she wanted there to be evidence if he did.

“I know that the people are not protected against the police,” Ms. Reynolds said.

Through dozens of questions from prosecutors and defense lawyers, Ms. Reynolds responded in even, firm tones, often repeating the phrase, “That is correct.” Her testimony also offered a fuller portrait of a woman the public had come to know from her video that day.

Ms. Reynolds said she moved as a girl with her family to Minnesota from Chicago seeking a better life. She attended high school here, but did not receive a diploma, and spent time in homeless shelters before meeting and moving in with Mr. Castile, a longtime cafeteria manager for the St. Paul school district.

Ms. Reynolds said Mr. Castile embraced her and became “a father figure” to her young daughter, Dae’Anna, now 5. He would read the girl books and make sure she had a healthy breakfast. Jurors saw a photo of Mr. Castile and Dae’Anna celebrating her birthday at the Mall of America.

“He was a friend to her,” Ms. Reynolds said. “He was a role model.”

On the day of the shooting, Ms. Reynolds said Mr. Castile went to work, then got his hair fixed. Separately, Ms. Reynolds took public transit to drop her daughter off at preschool that morning and traveled to her job at a dollar store. Later that day, Ms. Reynolds said she and her sister smoked marijuana, picked up Dae’Anna from preschool and met up with Mr. Castile in the evening to go grocery shopping.

Earl Gray, a lawyer for Officer Yanez, questioned Ms. Reynolds at length about her marijuana use. Ms. Reynolds said she and Mr. Castile smoked marijuana daily, and had done so for years. She admitted that there was marijuana in the car at the time Officer Yanez pulled them over, but she said they had not been smoking.

Mr. Gray also pointed out what he said were inconsistent details in Ms. Reynolds’s past statements about the case. Ms. Reynolds said she was being honest. Lawyers did not mention felony assault charges Ms. Reynolds is facing in connection with an alleged hammer attack this year. That case is still pending.

In court on Tuesday, Officer Joseph Kauser, Officer Yanez’s partner, testified that he did not see a gun in Mr. Castile’s car, did not smell the burned marijuana described by Officer Yanez and was not alarmed by the situation until his colleague started shooting.

“I did not feel threatened at that point from where I was standing,” Officer Kauser said of the moment right before the shooting.

But Officer Kauser, a college classmate and longtime friend of Officer Yanez, praised his partner’s character and said he believed Officer Yanez acted appropriately. Officer Yanez’s lawyers have said their client feared for his life and will testify in his own defense.

Mr. Castile, who had a permit to carry a pistol, told Officer Yanez during the traffic stop that he had a firearm with him. The trial rests largely on whether jurors believe Officer Yanez’s claim that Mr. Castile was grabbing for that gun, or whether they believe Ms. Reynolds’s statement that her boyfriend was simply reaching for his wallet.