More than 18 months after they were found lying in a cramped apartment amid the bodies of their relatives, a Bucks County mother and daughter on Monday pleaded guilty but mentally ill to first-degree murder in a deal that will imprison them for life but spare them the possibility of the death penalty.

Capping a bizarre saga, Shana and Dominique Decree entered their pleas in the Doylestown courtroom of President Judge Wallace H. Bateman, who told the two the harm they caused was "unimaginable.”

“This is horrible and tragic, because I do believe the two of you have expressed remorse,” Bateman told the Decrees as he sentenced each to five consecutive terms of life in prison. “Unfortunately, that doesn’t bring them back. You can’t say, ‘sorry,' and expect people to move on with their lives.”

» READ MORE: Inside a cramped Bucks County apartment, 5 family members dead in murder-suicide pact, survivors say

Addressing both Bateman and their relatives in the courtroom, both women offered tearful apologies.

“The hardest thing for me to do is decide who to say I’m sorry to first,” Shana Decree said. “To my family, I am sorry for taking away these beautiful souls in such a horrible manner."

Dominique Decree, through heavy sobs, said her actions will haunt her for the rest of her life.

“I’m so sorry for everything that happened, and I truly don’t understand why it happened,” she said.

A case worker from Bucks County Children and Youth Services paid a visit to the Decree family’s apartment in Morrisville on Feb. 25, 2019. Inside the basement dwelling, the worker found the bodies of Shana Decree’s children Naa’Irah Smith, 25, and Damon Decree Jr., 13, as well as Shana’s sister, Jamilla Campbell, 42, of Trenton, and Campbell’s twin daughters, Imani and Erika Allen, both 9.

» READ MORE: Bucks murder-suicide plan: Read the charging documents for Shana Decree, Dominique Decree

Shana Decree, 47, and Dominique Decree, 21, were lying unresponsive in a bedroom, and were taken to a nearby hospital. During later interviews with police, the two gave conflicting stories of what had transpired in the apartment, which had been thrown into disarray, apparently after a prolonged struggle.

The basic details, however, remained the same: Everyone in the apartment, including Campbell’s young daughters, “wanted to die” and had been “talking about suicide,” the two told police. Autopsies conducted on the victims revealed that all but Campbell had been asphyxiated. The eldest victim had died from strangulation, according to the county coroner.

During Monday’s hearing, Deputy District Attorney Christopher Rees said the killings took place over the course of three days. After the two suspects were arrested, court-appointed psychologists and psychiatrists concluded both suffer from severe mental illness, including schizoid personality disorder, major depressive disorder, and PTSD.

Both had sought mental health treatment throughout their lives, with varying success — Dominique started as young as 5, according to her attorney, John J. Fioravanti Jr.

At the time of the killings, Shana Decree had grown more isolated and was suffering from delusions, said her lawyer, Christa Dunleavy. She “believed the world was ending and there were demons in her house, and she had to obey them."

“Her family tried to help her,” Dunleavy said, “but the delusions were too strong.”

Since the killings, both suspects have expressed horror and remorse at what they had done, their attorneys said. Rees and prosecutors agreed, leading to the plea deal.

“Dealing with this case does not invoke the kind of righteous anger you would think of when you become a prosecutor,” Rees said after the hearing. "We did not fight to right wrongs on this case; there’s no way we could right these wrongs. What we tried to find was the closest we could to justice, and I hope and pray we got pretty close.”

» READ MORE: Family found dead in Morrisville grew isolated, spoke of ‘demons’ in weeks before grisly discovery

Family members of the defendants who attended Monday’s hearing expressed both sorrow and anger.

Damon Decree Sr., the father of Dominique and Damon Jr., spoke of the pain of losing two children, pain that he said drove him to attempt suicide.

“The bottom line is, I didn’t do the number-one job a parent has: I didn’t keep him safe," he said of Damon. “I may not have been the best dad, but no one deserves this.”

Ronald Smith, father of Naa’Irah, similarly shared his grief and frustration through a statement read by Rees in court. In it, he wrote of his daughter’s plans to marry and his anticipation of that day.

“As you can see, she didn’t get to do this, because her mother and sister had other plans,” Smith said. “They treacherously took five beautiful lives off the face of the Earth.”