A Chester County woman who allowed her boyfriend to severely beat her daughter, leaving the child near death, pleaded guilty to aggravated assault and related offenses Friday.

Julianne Lewis tearfully admitted her guilt during a brief hearing before Common Pleas Court Judge Anne Marie Wheatcraft.

Lewis, 32, was arrested in November after police were called to her apartment in Westtown Township and found her 9-year-old daughter unresponsive. The girl had extensive injuries, including bruises and damage to her lungs and eyes in what investigators described as “a near fatality.”

District Attorney Deborah Ryan said the abuse was tantamount to “torture.” The girl spent three months in the hospital, where she underwent physical therapy to learn how to walk again, prosecutors said Friday. She has since been placed with a foster family outside of Pennsylvania.

Lewis’ live-in boyfriend, Dimitrios Moscharis, 34, was arrested that same week and charged with attempted murder, strangulation, aggravated assault, child endangerment, and related crimes. Investigators later discovered evidence that Moscharis had sexually assaulted the girl as well.

Moscharis will never face a judge, however: Officials at the Chester County Correctional Facility found him dead inside his cell on June 18. The county’s chief medical examiner, Christina VandePol, said this week that the cause and manner of Moscharis’ death remain under investigation.

Initially, Moscharis told police he was the girl’s father and said he had been watching her while her mother was working as a Lyft driver in Northeast Philadelphia, according to court filings. The girl suffered a panic attack, he said, and he told her to take a shower to calm down. When he went to check on her, he said, he found her unresponsive, and tried to rouse her by splashing water on her, and then performing CPR.

Lewis told police Moscharis was not the girl’s father, and said she had only been dating him for two months, according to the affidavit of probable cause for her arrest. She said Moscharis had been disciplining the child, sometimes hitting her with curtain rods and forcing her to walk up and down the stairs with her arms extended, the affidavit said.

Lewis told police she allowed Moscharis to treat her daughter this way, and gradually noticed that the girl‘s injuries from the beatings became worse each time.

Moscharis also locked the girl inside a closet at the home, sometimes for hours, and forced her to sleep on the concrete floor of the apartment’s basement, according to the affidavit.

Investigators uncovered internet searches on Lewis’ computer showing that in the days before her daughter was rushed to the hospital, she had researched how to put a child up for adoption.

In court Friday, Lewis admitted that she gained sole custody of her daughter by falsely accusing the girl’s father of domestic abuse. She said she did this at the direction of Moscharis.

Lewis will be sentenced at a later date.