Pauley Perrette is slowly seeing justice.
David Merck, who attacked the NCIS star last year, was ordered during a hearing on Thursday to serve time at a jail-based competency treatment program in San Bernardino County.
WATCH: Pauley Perrette Is 'Grateful to Be Alive' After Violent Attack by 'Psychotic Homeless Man'
At the hearing, it was decided that Merck will be a part of the county jail's program that provides mental health services to felony defendants that the court has found incompetent to stand trial. A court date has been set for Oct. 28 to determine when he will be transported to the county facility or to confirm the transfer has been completed.
Merck was charged with attacking and threatening to kill Perrette near her Hollywood home on Nov. 12 last year.
ET was with the actress the day after the scary incident, where she said she was just glad to be alive.
"He told me he was going to kill me several times and I absolutely believed him," she emotionally recalled. "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."
"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 Fights Back Tears as She Confronts Her Alleged Attacker in Court
See more in the video below.