LANSING, MICH. - An Onondaga Township woman admitted in court today that she didn't feed her 16-year-old daughter for “a couple weeks” and that she didn’t try to get help before the girl starved to death.

Cari Ann Wright, 44, was the sole caregiver for Hannah Warner, who was born with physical and mental disabilities, couldn't communicate verbally and had been bedridden for most of her life, according to testimony at a hearing that led to charges against Wright.

At the time of her death in 2015, Hannah weighed 43 pounds, according to court records, and had large, open sores across her lower back and buttocks, and her clothing and bedding were soiled. Investigators determined that Hannah, who had a condition called "chromosome translocation," had last been to a doctor in March 2014, about 18 months before she died.

As part of a plea agreement, Wright pleaded guilty to second-degree murder while mentally ill, and prosecutors agreed to drop charges of open murder and felony child abuse. Prosecutors previously dropped a torture charge.

Wright will face 20 to 40 years in prison if Ingham County Circuit Judge Joyce Draganchuck abides by the details of the plea agreement. She could have faced up to life in prison.

Wright’s attorney had previously announced plans to use an insanity defense at trial. Wright underwent a criminal responsibility evaluation at the state’s Center for Forensic Psychiatry, officials said; a psychiatrist found that she was mentally ill at the time of the crime, but did not meet the standard for legal insanity.

The guilty but mentally ill plea will allow Wright to receive psychiatric services while in prison, said Ingham County Prosecutor Carol Siemon.

The agreement reflected "the best outcome we could get for everyone," she said, as part of a case that "ended as tragically as any I've ever seen."

"The death was preventable, and we have support services in place to take care of children with special needs," she said.

It’s a very very sad case,” said Wright's attorney, Brian Laxton. “Untreated mental illness in an all-too-common occurrence.”

State Children's Protective Services workers had been involved in the past regarding complaints that Hannah was not being properly cared for, according to court records, but the family was not under state supervision at the time Hannah died.