A Worcester County judge has found Erika Murray not guilty of second-degree murder in the death of her child whose decomposed body was found inside a closet in her squalid Blackstone home in 2014.

Judge Janet Kenton-Walker also found Murray guilty of two counts of assault and battery on a child causing substantial bodily injury and not guilty of two counts of reckless endangerment of a child. Prosecutors had accused Murray of causing injuries to an infant and 3-year-old found dirty and isolated in her home, and of endangering her two older children by causing them to live in squalor and filth.

On the final counts, Murray was found guilty of two counts of animal cruelty for the neglect of pets found in her home.

Kenton-Walker ruled that while prosecutors proved one of the dead infants survived childbirth, they failed to prove that Murray could have saved the infant by calling for help or performing CPR when she discovered the baby blue and not breathing.

Murray is scheduled to be sentenced on July 11 for assault and battery causing serious injury to her two young children and animal cruelty.

In a statement to a full courtroom, Kenton-Walker said the disturbing details of the case -- and her feelings about those facts as a parent herself -- could not legally affect her ruling.

“Emotion or sympathy can play no part in the decision that I make," Kenton-Walker said. "This is a court of law, not a court of public opinion.”

In remarks to reporters, Murray’s defense attorney Keith Halpern said there is no question that Murray’s home was a tragic and unhealthy environment for her children. But, he said, a murder charge requires proving that Murray both knew her infant child was in distress and that she could have saved the baby if she acted differently.

Prosecutors presented no evidence of that, Halpern said.

“The facts in this case would not allow any judge to convict her of murder if they followed the law,” he said.

Worcester District Attorney Joseph Early Jr. thanked police and prosecutors for their work on the case in a statement.

“This was a very hard case with a very difficult set of facts as it always is when dealing with children who are victims. It has emotionally affected many people throughout Worcester County," Early said. “We appreciate all the time and effort the judge put into her decision in this case. The court has spoken.”

And Acting Blackstone Police Chief Gregory Gilmore, who was among the initial responders to the Murray home and interviewed her about the dead infants shortly before her arrest, acknowledged the effect the case has had on his town.

“This was a challenging case from the very beginning, but it has been most difficult for the children involved in this horrific situation,” Gimore said. “We also hope that with the end of this case, our community, which was shocked to our very core, can find closure.”

Throughout the two-week trial, prosecutors described Murray as a deceptive and neglectful mother who killed or severely neglected her unwanted younger children, while keeping their parentage a secret even from her own family.

“It all points to this idea of the two worlds that Erika Murray created. For [her youngest daughters,] there were obvious hazards in that home. Dangers. Children abandoned in that darkness," Assistant District Attorney Christopher Hodgens said in closing arguments on Friday.

But her defense attorney Keith Haplern disputed those conclusions, arguing that Murray was deluded, rather than malicious. Murray, Halpern said, was driven by fear that her emotionally abusive boyfriend would discover the truth about the children, and genuinely believed herself to be a good mother -- despite the infestations, garbage and overpowering odor that police found when they entered her home in August 2014.

“It wasn’t a decision she made to ignore the risks and jeopardize the health of her children," Halpern said during closing arguments. "She didn’t see anything else other than getting through the day and keeping the secrets.”

The case dates back to 2014, when Murray’s neighbor Betsy Brown discovered the grim truth about Murray’s St. Paul Street home.

Brown’s son was neighborhood friends with Murray’s 10-year-old son, and the two spent long hours playing outside with each other that summer, Brown testified. So when Murray asked Brown to take care of her son while she went out on August 28, 2014, she obliged.

She had never been inside Murray’s home before, she said. But that changed when she got a call from her son later that day. He and Murray’s boy were in her home, and needed help caring for a toddler and an infant who would not stop crying.

Brown testified that she was shocked, as she had no idea Murray had any children other than her son’s friend and Murray’s 13-year-old daughter. When she arrived, she was hit first with an overpowering stench. As she went upstairs, in bedrooms whose floors were covered with dirty diapers, she found the f5-month-old and 3-year-old girls.

Brown called police, and later that day the young children were taken into the custody of the Department of Children and Families. Murray said in interviews with DCF and police that, knowing her boyfriend did not want any more children, she had kept her pregnancies secret and delivered the babies in her downstairs bathroom.

As they grew, she lied to her family and said she was babysitting them for another woman, she said in the interviews. She told investigators that the young girls had never been outdoors or seen a doctor, but that she would bring them downstairs and care for them when her boyfriend was at work.

The house was condemned by Blackstone health authorities.

The story grew darker in September, when Massachusetts State Police Troopers executing a search warrant on Murray’s home found the decomposed bodies of three infants in upstairs closets. After initially lying to detectives, Murray acknowledged that she had given birth to the babies, saying that two were stillborn and one lived for a short time before dying.

Murray was charged with two counts of second-degree murder, with investigators determining that two of the infants had been born alive. But Kenton-Walker dropped one of those charges in the middle of the trial, ruling that prosecutors had only presented evidence that one of the babies was not stillborn.

Halpern, Murray’s defense attorney, did not dispute most of the facts in the case -- with the exception of debating whether any of the children were born alive. Much of the testimony at trial came from forensic specialists, doctors and psychologists, who gave their opinions about Murray’s mental state and the conditions of her children.

A forensic anthropologist who testified for the prosecution said he had determined that one of the children was born alive by identifying its “neonatal line” -- a line of enamel that he said appears on the teeth of infants only after they are born. Halpern called his own expert, who claimed that the science did not support the other anthropologist’s conclusions.

And while forensic psychologists and psychiatrists who examined Murray testified that she suffered from personality disorders, did not recognize the direness of her circumstances and lived in fear of her boyfriend, a psychiatrist called by the prosecution contested those diagnoses. Murray, he said, was not mentally ill -- rather, she was a serial liar.

Kenton-Walker found the defense’s psychological experts experts more convincing, saying in her ruling that a combination of an abusive relationship, cognitive deficits and her avoidant and dependent personality disorders had made her incapable of rationally addressing her problems or appreciating how severe they really were.

But for the infant and toddler found in Murray’s home, Kenton-Walker sided with the prosecution. Medical evidence showed they had experienced “profound neglect” that cause them physical harm, Kenton-Walker said, making Murray guilty of assault and battery causing serious injury.