Left: Marianna Miles. Right: Miles' stepdaughter holds up the chains used to hold her down in her bedroom (McLennan County District Attorney's Office).

A Texas woman is headed to prison for decades for abusing her middle-school-age stepdaughter by chaining her to a locked bedroom and forcing her to "rummage through garbage cans for food."

Marianna Miles, 46, was sentenced Friday to up to 70 years behind bars after a jury convicted her of injury to child — causing serious mental injury on Thursday, according to the McLennan County District Attorney's Office.

Miles took custody of the girl and her four brothers after their father and biological mother were sentenced to prison for unrelated charges. Cops began investigating in 2022 when Miles enrolled the girl in Connally Junior High School in Elm Mott, just outside of Waco.

The stepmother had a meeting with school officials where she told them the girl had "severe behavior problems" and needed to be "watched closely at all times." Miles said the girl was not allowed to eat anything without her "express approval," prosecutors said.

But school officials were more troubled by Miles' behavior toward the child, especially after they found the girl to be "well-behaved and polite" although she was "unkempt with inadequate clothing."

"Educators also noticed that the child was thin and always hungry, even going so far as to rummage through garbage cans for food," prosecutors said.

Then in October 2022 a teacher noticed an injury to the child's face. At first, the girl was hesitant to say what happened but then pointed the finger at Miles, saying her stepmom beat her with a belt buckle. The teacher alerted Child Protective Services and the Lacy Lakeview Police Department.

Authorities visited Miles' home and discovered the girl was forced to stay in a "sparse" bedroom with no mattress and an alarm on the door that would go off if she tried to leave the room. According to a courtroom report from local CBS affiliate KWTX, the girl testified that Miles would force her to stay in her room for up to 20 hours during the pandemic.

More from Law&Crime: 'Hit him on his face': Florida woman admittedly beat 7-year-old son with autism with a belt after he kissed classmate on the cheek, police say

Not only would Miles beat her, but the stepmother would also force the victim's brothers to beat her.

"Miles also bound the child in both duct tape and, ultimately, heavy chains," prosecutors said.

The suspect initially denied using chains on the girl but CPS investigators found the them inside the home. A child psychologist testified at trial that the girl suffers from post-traumatic stress disorder.

Miles reportedly testified she restrained the girl because she would often run away, attempted suicide three times and was a threat to the younger siblings.

"Our greatest privilege as prosecutors is to hold accountable those who perpetrate evil against those who are most vulnerable," Tara Avants and Will Hix, assistant district attorneys, said in a statement. "This case exemplifies that. If convicted criminals were treated in the manner that Marianna Miles treated this child, prison authorities would be subject to prosecution. We are grateful to the real-life superheroes at Connally Junior High School, CPS and the Lacy Lakeview Police Department who made it possible to bring justice to an offender who earned every minute of her 70-year sentence."

By law, Miles will be eligible for parole after 15 years. Prosecutors said they plan to object to her parole when she is eligible.

The girl, now 16, is living with her mother and siblings in Killeen, per KWTX.