NEW YORK (Reuters) - A New York nanny was found guilty on Wednesday of stabbing to death two children in her care at their luxury Manhattan apartment, in a case that drew national headlines.

A jury unanimously rejected the insanity defense of Yoselyn Ortega, 55, whose lawyer said she hallucinated a devil’s order “to kill the children and herself” when she plunged a kitchen knife into Lucia Krim, 6, nicknamed Lulu, and her brother Leo, 2, and left their bloody bodies in a bathtub.

The Oct. 25, 2012 killings were discovered when Marina Krim returned to the family’s Upper West Side apartment to find her children dead and their nanny standing over them stabbing her own neck with a knife. Krim had come home with the children’s 3-year-old sister, Nessie, after Ortega failed to show up at Lulu’s dance class.

Ortega was charged with two counts each of first- and second-degree murder, punishable by a maximum sentence of life in prison.

“We hope now that this verdict will give the Krim family an opportunity to heal, to find some closure and to move on in their lives,” Manhattan District Attorney Cyrus Vance told reporters following the verdict, as a teary-eyed Kevin Krim, the children’s father, stood beside him. Krim declined to take questions.

Insanity defenses rarely succeed in New York, where proving mental illness is not enough to find a defendant not responsible for a crime. Defense attorneys must demonstrate that the suspect could not understand the consequences of his or her actions.

Only six people were cleared of criminal charges due to insanity out of 5,111 murder cases tried between 2007 and 2016 in New York, according to Janine Kava, spokeswoman for the state Division of Criminal Justice Services. The state does not track how often the defense is raised, she said.

During the trial at state Supreme Court in Manhattan, Ortega’s lawyers argued she was too psychotic to comprehend what she was doing.

But prosecutors said the evidence showed she had thought through her actions and thus understood the consequences, including grabbing Leo from behind and slitting his neck so he would not fight back as his sister had.

Ortega’s attack was prompted by her anger at being asked to work too hard, prosecutors said. Ortega, who had brought her 17-year-old son from the Dominican Republic and enrolled him in a private school, was overwhelmed by financial concerns, they said.