It was an emotional day for Pauley Perrette.
The NCIS star appeared at a preliminary hearing in a Los Angeles courtroom on Wednesday to confront David Merck, the 45-year-old man who allegedly attacked her last month. Fighting back tears, the 46-year-old actress took the stand to give her testimony and recount the night she was assaulted outside her Hollywood home.
Perrette refused to look at Merck, except for when she was asked to identify him. Merck, who pleaded not guilty to charges of making a threat and false imprisonment using violence, stared at Perrette throughout her testimony. The actress was visibly upset upon leaving the stand, and was escorted out of the courtroom through a private exit.
WATCH: Pauley Perrette Was 'Crying All Night' After Attack: I Believed He Was Going to Kill Me
If convicted, Merck could face up to four years in prison. After his lawyer's motions to reduce the charges were denied, Merck's bail was set at $60,000.
"He told me he was going to kill me several times and I absolutely believed him," Perrette told ET after the alleged attack. "I prayed as hard as I've ever prayed for anything ever in my life, and I didn't do anything. I thought, anything I do would escalate the situation -- I couldn't overcome him, he was stronger than me."
MORE: Pauley Perrette's Alleged Attacker Charged, Could Face Four Years in Prison
"I took a pen and I immediately, in shock, like, drew a picture of the guy, 'cause I didn't have a camera," she added. "The guy looks exactly like the thing that I drew."
Despite her distress, Perrette, who supports efforts against homelessness, spoke out with sympathy for her alleged attacker.
WATCH: Pauley Perrette Comforted by Her Church Congregation Following Violent Attack
"[My heart] breaks for every single person that's out there on the streets," she said, "especially [those] with undiagnosed or untreated mental illness."
"I'm glad I lived," she said, adding of her alleged attacker, "I'm glad he didn't kill me, but whatever, he doesn't know who I am. He doesn't know. He's mentally ill and he has no support."
WATCH: Pauley Perrette Is 'Grateful to Be Alive' After Violent Attack by 'Psychotic Homeless Man'
On the Sunday following the incident, Perrette attended church services to cope with the alleged attack. Watch the video below.
--Reporting by Brendon Geoffrion