Sonya Spoon, who suffered from mental-health problems, was sentenced to 45 years in prison in the murders of her daughter, 3, and son, 1. (Prince George’s County/Associated Press)

“THESE TWO babies . . . they never had a chance.” That was the grim appraisal of Prince George’s County State’s Attorney Angela Alsobrooks as she catalogued the failures that led to the murders of two young children by their mentally ill mother. There were clear warnings that a troubled young mother needed help and that her children were in danger. The tragic case exposes fault lines in systems set up to treat mental illness and protect children, underscoring the need for improvements.

Sonya Spoon was sentenced last Wednesday to 45 years in prison after pleading guilty to the 2014 deaths of her 3-year-old daughter and 1-year-old son. The Cheverly woman, then 24, wrapped her children’s heads with plastic bags and duct tape and suffocated them before attempting suicide. Less than a week before the children were killed, police had taken Ms. Spoon to a hospital for an emergency psychiatric evaluation because she had threatened to kill her daughter and herself. She was released over the objections of her mother — “She’s in a state of mind that had me commit her in the first place” was her desperate plea to hospital staff. Thirty-six hours later, the children were dead.

No question, as her attorney argued, the mental-health system failed her. The hospital that judged her ready for release with a prescription for antidepressants needs to do some soul-searching over how it handled this case. Families that are struggling to deal with the mental-health problems of loved ones need more support.

The case also reveals what Ms. Alsobrooks has characterized as a gap in the reporting system aimed at protecting children. Under current law, teachers, health-care workers and certain other workers must report to authorities when they suspect a child has been abused but not when they believe a child is in danger of being abused. Ms. Alsobrooks has spent the past three years unsuccessfully trying to persuade state lawmakers to strengthen the reporting requirement to cover threats and to provide training in assessing danger. A bill to accomplish those goals passed the House this year but died in a Senate committee. Ms. Alsobrooks said she will advocate for the bill again next year.