She knew not what she did.
That was the opinion offered by a defense expert Thursday in the trial of an Upper West Side nanny accused of slaughtering two kids in her care.
The shrink, testifying for Yoselyn Ortega's defense team, which is mounting an insanity defense, said the babysitter was in a "dissociative state" when she repeatedly stabbed and slashed Lulu and Leo Krim, 6 and 2, in their family's W. 75th St. apartment on Oct. 25, 2012.
"She wasn't in her normal conscious state where she could control her behavior or where she could form an intent to act to consciously act," Karen Rosenbaum testified on direct-examination by defense lawyer Valerie Van Leer-Greenberg.
"She was in a dissociative state and a psychotic state and wasn't aware of her actions."
Ortega's lawyer has argued to the jury that the former child caretaker should be found not guilty by reason of mental disease or defect.
Rosenbaum said that in her "medical opinion" Ortega couldn't form a conscious objective or intent to murder the Krim children.
Rosenbaum pointed to Ortega's repeated claims to her that she was hearing voices prior to the tragedy and that the "devil" eventually told her to murder the children and take her own life.
Lulu was stabbed and cut about 30 times as she tried to fend off the unimaginable attack and Leo, who was too little to resist, had five knife wounds.
Ortega plunged one of the two kitchen knives she used into her own throat but failed to strike the jugular vein and survived her severe injuries.
Rosenbaum said she didn't believe Ortega was faking her symptoms or lying about the voices overtaking her mind.
The voices got "stronger" and shortly before the attack they were "telling her to kill herself and to kill the children," she recalled.
Rosenbaum argued there was no other explanation besides insanity.
"She loved the children. She had always talked about loving the children," Rosenbaum said. “She would put the children on the phone with (her own son) and say your brother and sister want to talk to you.”
She said that Ortega's family and friends said she liked the Krims.
"There was no reason why she should want to hurt anybody other than the psychotic delusions that she was experiencing," she added.
Prosecutors are expected to grill Rosenbaum on her findings, which are based largely on Ortega's self-reporting of her symptoms over 13 interviews.
The district attorney argues that Ortega was acting out of spite against the children's mother Marina Krim, who she grew to resent over the two-year period she worked under her supervision.
Cross-examination begins Thursday afternoon.
Ortega faces life behind bars if convicted of murder. If she's found not responsible, she'll likely spend the rest of her life in a mental institution.