Sonya Spoon, 26, had suffered from mental health problems before killing her son, 1, and daughter, 3. (Prince George’s County Police/AP)

About four days after police took Sonya Spoon for an emergency mental health evaluation because she had threatened to kill herself and her daughter, doctors said she had been treated and prescribed antidepressants and was ready for release from the hospital.

But Spoon’s mother pleaded with medical professionals to keep her daughter.

“There is no change,” Pavi Spoon recalled telling hospital staff as she raised objections. “She’s in a state of mind that had me commit her in the first place.”

Thirty-six hours later, Spoon wrapped her young children’s heads with plastic bags and duct tape and suffocated them before attempting suicide.

On Wednesday, she was sentenced to 45 years in prison on two counts of second-degree murder in the 2014 deaths of her daughter and son — Kayla Thompson, 3, and Ayden Spoon, 1.

“I don’t know exactly what’s wrong with me,” Spoon said in an apology during her sentencing hearing. “What I did was horribly wrong. I wasn’t well and couldn’t see clearly what was going on.”

The case culminated in the “unthinkable,” said Prince George’s County State’s Attorney Angela Alsobrooks. The children were in the hands of their mother, who had mental health problems. A man who had been convicted of child abuse was seeking custody of one of the pair. And a “gaping loophole” in state law left child welfare unaware of Spoon’s threats.

“The saddest aspect of this case is that these two babies . . . they never had a chance,” Alsobrooks said.

Susan Fiester, a Maryland psychiatrist, said in court that Spoon had several problems that prevented her from thinking clearly the day she killed her children. Spoon suffered from attachment disorder after being abandoned as a 4-month-old by her Russian parents who went to a New Year’s party and left her in the family’s apartment.

After three years in an orphanage and an adoption by American parents, Spoon sustained a traumatic brain injury in a car crash at the age of 18. And after the birth of her children, she was drawn into a custody battle with the father of her daughter while dealing with postpartum depression.

It was the prospect of losing custody of her daughter to a man that was abusive that caused Spoon to panic, Fiester testified.

“She was so distraught, and the depression became so severe that she actually became suicidal,” Fiester said.

Spoon crumbled emotionally, prompting her mother to call police to take Spoon in for an emergency mental evaluation. After her short commitment, medical professionals released her, saying her antidepressants soon would make her feel better.

Less than two days later, Spoon killed her children.

“The significant thing here is Sonya has been abandoned twice in her life,” Pavi Spoon said. “At 4 months by her biological parents and at 25 by medical health caregivers.”

Prince George's County Circuit Court Judge Lawrence V. Hill said while he believed Spoon is remorseful and endured unfortunate circumstances, she still was responsible for her actions.

“I had a pang of nausea when I heard what happened,” Hill said about the way in which the children died.

Hill also questioned why Spoon did not frantically try to remove the bags from her children’s heads after coming to her senses and abandoning her suicide attempt. Spoon had taped a plastic bag around her own head and duct-taped her hands, but went running to her mother to free her before rushing to get help for her two children.

“Her reaction was selfish,” said Hill, who gave Spoon the option of serving her sentence at the Patuxent Institution, a prison that offers inmates mental health services.

At the time of her hospital release in 2014, Spoon was discharged without child welfare officials knowing of the threats she had aimed at her children. Maryland law does not require law enforcement or medical professionals to report threats against children — only suspected neglect or abuse.

Prince George’s County officials have tried to change state law for the past three years to require social workers, medical professionals and police to report verbal threats of “imminent severe bodily harm or death to a child,” but the legislation has never received enough backing from politicians to make a change.

Spoon’s case represents a failing of the mental health and criminal justice systems, said her lawyer, Mirriam Seddiq. “We have a crisis of not being able to handle mental health issues in this country.”

Spoon was not ill enough to be declared incompetent at trial, Seddiq said, but was not a hardened criminal who would deserve to serve life without parole.

“It’s all or nothing,” Seddiq said.