The standard is so difficult to meet that few defendants who present an insanity defense win at trial, even when they have long, documented histories of psychosis. Only six people were found at trial to be not responsible by reason of mental disease or defect between 2007 and 2016, out of 5,111 murder cases, according to the state Division of Criminal Justice Services. The state does not track how often the defense is raised.
Prosecutors typically argue that the insanity claim is a ruse invented after the crime and seize on any evidence of a cover-up, or that the killing was planned, to argue the defendant knew it was wrong.
“Prosecutors are very adept at showing that the defendant engaged in some rational behavior, that they planned the attack in some way, or they did things to escape detection or made up a story,” said Peter L. Arenella, a law professor at the University of California at Los Angeles who studies insanity cases. “This shows that even if they were mentally ill, they still understood what was wrong.”
Defense lawyers typically focus on the defendant’s history of mental illness, stressing his irrational worldview and the inexplicable nature of the crime.
In the end, the trials become battles between mental health experts hired by both sides, who, using the same set of facts, come to opposite conclusions about the defendant’s capacity to understand his acts at the moment of the crime.
The first salvo came on Tuesday, when a psychiatrist for the defense, Dr. Karen Rosenbaum, testified that Ms. Ortega told her in a series of interviews that the devil was “possessing her more and more” in the months before the killings. She said Ms. Ortega also heard voices that “told her to kill people, to kill herself and, eventually, to kill the children.”
As a rule, jurors tend to be skeptical of insanity claims like Ms. Ortega’s, because they worry about being duped and releasing a dangerous person into the world, experts on the defense say.
Frederick L. Sosinsky, a Manhattan defense lawyer who has argued insanity in two murder cases, said jurors often had a preconceived notion of what a person experiencing psychotic episodes looks like, expecting him to be “incoherent, mumbling, almost catatonic.”
“It doesn’t look anything like that,’ he said. “You can’t see what’s going on in the mind.” Often, he said, the most important factor for jurors is how the defendant strikes them in the first videotaped police interrogation.
In Ms. Ortega’s case, even before the start of trial, potential jurors struggled with the idea of having to determine her state of mind at the time of the murders. One prospective juror said she could not understand why Ms. Ortega “would try to kill herself without knowing she did something wrong.”
Another said: “I couldn’t decide someone’s sanity or not. How could you ask me?”
The hurdles facing the defense were evident in court on Monday, when a neighbor of the Krims, called by the defense to testify about seeing Ms. Ortega with the children just before the murder, suddenly shouted, “I am angry because this is not a case of mental illness.”
Once in a while the defense is persuasive. In 2015, a Manhattan jury determined that Alejandro Morales, who had been repeatedly diagnosed with schizophrenia, was not criminally responsible for the 2010 fatal stabbing of a 9-year-old boy inside of his mother’s Upper West Side apartment.
Mr. Morales had delusions that he was being chased by giant rats and gang members in the days before the murder. Jurors agreed he lacked the capacity to know that killing the boy was wrong, even though, as prosecutors pointed out, he fled the apartment, hid the knife and lied to the police. He was later committed to a secure psychiatric hospital.
Jurors more often opt to convict in cases with defendants with serious mental illnesses. David Tarloff was a schizophrenic man from Queens who suffered from delusions about communicating with God and had been committed to a mental hospital numerous times. He was found guilty in 2013 of killing Kathryn Faughey, a Manhattan psychologist, with a mallet and a knife during a robbery attempt. He had told doctors the Lord had sanctioned the robbery.
And in 2016 a Bronx jury convicted Bashid McLean, who fatally stabbed, beheaded and dismembered his mother before snapping a selfie with her head. He had attempted suicide several times and was on medication for depression and schizophrenia.
Mr. McLean’s lawyer, Lynn Calvacca, said her client was clearly mentally ill, but the prosecution focused on evidence that he covered up the crime, hiding his mother’s remains and telling police he did not know where she was. The jury determined Mr. McLean knew he was committing an immoral act, even if the brutality of the murder reflected a diseased mind, she said.
“There is no way a reasonable person could say that what this guy did was sane,” Ms. Calvacca said. “He cut off his mother’s head and took a selfie with it.”
Jurors often have trouble finding a person “not responsible,” for a horrific act he admits committing, defense lawyers said. Many jurors also balk at sending a defendant to a mental hospital rather than prison, fearing he might eventually be released on a doctor’s recommendation.
In practice, judges typically send such defendants to one of the state’s two secure psychiatric hospitals, where they are ordered to be held until doctors deem them no longer to be dangerous, and a judge agrees. Many judges and mental health professionals are loath to free a known killer, and the majority spend more time locked up than they would have served had they pleaded guilty to manslaughter or second-degree murder.
“It’s very, very tough to get out,” said Charles P. Ewing, a forensic psychologist and law professor. “It rarely happens. They don’t want the responsibility of releasing someone who goes out and commits another offense.”
Still, some murder defendants who were found not responsible by reason of insanity do eventually earn release to outpatient care, state health officials said. According to the state Office of Mental Health, 416 defendants charged with a homicide offense but found not responsible have been released from the state’s maximum-security hospitals to highly supervised outpatient care since 1980.
The modern insanity defense has long been polemical, and the legal standards vary from state to state. Kansas, Montana, Idaho and Utah have abolished the defense altogether. Other states have adopted a “guilty but mentally ill” verdict. But most states, among them New York, use a variation of the legal test derived from the 1843 case of Daniel M’Naghten, an English lunatic who killed a secretary to Prime Minister Robert Peel.
In the United States. the insanity defense sparked a national uproar after a jury acquitted John Hinckley Jr. in the 1981 shooting of President Ronald Reagan. In response, Congress in 1984 shifted the burden of proving insanity to the defense in federal cases, and a majority of states, including New York, followed suit, making it much harder for defendants to prevail.
In Ms. Ortega’s trial, the prosecutors, Stuart Silberg and Courtney Groves, have argued that there is little evidence Ms. Ortega experienced anything more serious than mild depression and anxiety before the murders.
Instead, the prosecution has asserted that Ms. Ortega killed the children because she was angry at their mother, Marina Krim, for giving her additional housework and for asking her to work part time for a friend.
They have highlighted statements Ms. Ortega made to a psychologist three days before the murders and to a psychiatrist the week afterward, complaining about her workload and how Ms. Krim treated her.
On Oct. 25, 2012, Ms. Krim returned home to her apartment at about 5:30 p.m. with her middle child in tow and discovered her other two children stabbed to death in the bathroom. Ms. Ortega plunged a knife into her own neck when Ms. Krim opened the door.
But Ms. Ortega’s lawyer, Ms. Van Leer-Greenberg, contends Ms. Ortega has suffered from depression, psychotic thinking and hallucinations since her teens, and never received treatment until after her arrest.
Two of Ms. Ortega’s sisters have described in court how she went into deep depression twice, the first time in 1978 after another sister died unexpectedly and again in 2008 after a cousin shot himself on the balcony of her family home. She became a paranoid shut-in for months, hiding under the bed whenever a dog barked, they said.
Ms. Ortega was unraveling in the month before the murders, the sisters, Miladys Garcia and Delci Ortega, testified. Three days before the killings, she woke up in the middle of the night and began throwing pots and pans around the kitchen, but later had no recollection of it, Delci Ortega said.
In Tuesday’s testimony, Dr. Rosenbaum said Ms. Ortega would bang on pots and pans to dispel her hallucinations about the devil possessing her. She never told the Krims of her visions or of the voices telling her to hurt people, the doctor said, because she feared being fired and “didn’t want people to know she is crazy.”
“She struggled — she didn’t want to carry out the plans,” Dr. Rosenbaum said. She added Ms. Ortega had explained “she has no strength when the devil is trying to take her.”