WORCESTER, Mass. (AP) — A Massachusetts woman who lived in a squalid, vermin-infested home where authorities found the remains of three babies was cleared Thursday of second-degree murder, but was convicted of lesser charges.

Judge Janet Kenton-Walker said prosecutors did not prove that 35-year-old Erika Murray caused the death of one of the babies whom she had been charged with killing and hiding in her home filled with rodents, dead animals, dirty diapers and trash.

Kenton-Walker called the case "senseless" and "tragic," but said she had to be guided by the evidence rather than her emotions.

"Regardless of how disturbing the facts surrounding this case are to the community at large and to me as a parent, I cannot take into account those feelings," the judge said.

Murray was found guilty of animal cruelty and assault and battery on a child. She remains behind bars while she awaits sentencing, which is scheduled for July 11.

Murray was arrested in 2014 after the babies' bodies were discovered inside closets of her filthy home in Blackstone, Massachusetts, about 50 miles southwest of Boston along the Rhode Island border. Four living children were also removed from the home.

Murray's attorney said she suffered from mental illness and argued there's no evidence she caused the babies' deaths, suggesting they could have been stillborn.

"She is obviously mentally ill or she wouldn't be living in those circumstances," defense attorney Keith Halpern told reporters Thursday.

Worcester County District Attorney Joseph Early Jr. said "the court has spoken" and thanked the judge for the effort she put into her decision.

"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," he said in an emailed statement.

Murray was initially charged in two of the babies' deaths, but the judge dropped one of the murder counts because she said prosecutors couldn't prove one of those babies was born alive.

Story continues

Prosecutors had argued that Murray found the other baby blue and not breathing, causing its death by failing to call 911 or perform CPR.

Kenton-Walker said she agreed with prosecutors the baby was born alive, but said there was no evidence the baby would have lived if Murray had called for help.

The judge also found Murray not guilty of reckless endangerment of the two older children found living in the home, saying the woman's mental state prevented her from understanding how bad the home's conditions had become.

Kenton-Walker said Murray was emotionally abused by her boyfriend and had cognitive deficits and a personality disorder, sending her into a depression and her home into squalor.

"In her mind, Ms. Murray believed she was a good mother to all her children," the judge said.

The children first came to the attention of police when a 10-year-old boy who lived in the house went to a neighbor and asked for her help to get a baby to stop crying. The neighbor went into the house and found a crying baby on a bed, covered in feces, and no adults around.

Police were called and officials removed four living children — the 10-year-old boy as well as 13-year-old, 3-year-old and 6-month-old girls — from the home.

Authorities later found the remains of the three dead babies inside cardboard boxes in bedroom closets. Two of them were wearing diapers and clothing and the third still had the placenta attached, authorities said.