A teacher administering an online test who heard an 11-year-old student say she was hungry and only allowed to eat a small plate of rice each day alerted investigators in Ohio that something was amiss. Authorities found the girl was severely malnourished, living in filth and had been isolated for years.

The girl weighed just 47 pounds (21.3 kilograms) when she was found in September — roughly 30 pounds (13.6 kilograms) under the average weight for a girl her age, according to the Centers for Disease Control and Prevention. Investigators said they believe she had been mostly isolated at home and mistreated for at least the past three years.

She was, at times, forced to sleep on a urine-stained mattress, made to wear a diaper, and stay inside a locked trailer monitored by a security camera, said Brown County Prosecutor Zac Corbin.

“It’s just a wonder she got out of there when she did,” he said. “Where she was kept, it was not livable.”

Margaret Breeze is facing two counts of kidnapping, two counts of endangering children and felonious assault. Brown County Sheriff's Office

The girl’s legal custodian, 47-year-old Margaret Breeze, of Georgetown, was charged two weeks ago with child endangering, kidnapping and felonious assault. She has since pleaded not guilty and remains in the county jail, about 40 miles east of Cincinnati.

A message seeking comment was left with her attorney Thursday. Calls to her home were not answered.

The girl was homeschooled and taking the test from home so that she could remain being taught there, authorities said.

The teacher who alerted investigators noticed the girl was having trouble paying attention and asked her what was wrong, sheriff’s detective Quinn Carlson told The News Democrat of Georgetown, which first reported the arrest this week.

Officials with the county children services agency found the girl wearing a diaper, Carlson said.

The family denied abusing the girl and said they kept a camera in her room because she would attempt to get out of house, Carlson said.

The girl spent two weeks in the hospital after she was rescued and diagnosed with a disorder brought on by severe malnutrition and usually only seen in people from undeveloped areas of the world experiencing famine, Corbin said Wednesday.

She’s doing much better now and has gained about 15 pounds (6.8 kilograms), authorities said.

The girl had been living with Breeze since she was 6 years old after a court in Kentucky granted her custody, Corbin said. It wasn’t immediately clear whether they were related.

Breeze homeschooled the girl and last took her to a doctor when she was 8, he said. Records from that visit showed she weighed 51 pounds (23 kilograms) then, meaning she had lost 4 pounds (1.8 kilograms) during the past three years, Corbin said.

Investigators are continuing to look at whether there are other suspects or people who could have helped the girl, Corbin said. The Brown County Sheriff’s Office confirmed late Thursday that her husband, Charles Breeze, was taken into custody. Citing a statement from Brown County Jobs and Family Services, news outlets reported Charles Breeze is 61. It wasn’t immediately clear whether he had an attorney to comment on his behalf.

There were other children living in the house, but there were no signs they had been mistreated, he said. Those children also have been removed from the home, a converted church that sat alongside a cemetery.

Authorities did recover recordings of the child being yelled at and threatened, but it’s unclear who was yelling, Corbin said.

The case recalls another from four year ago, when a woman and her boyfriend in southern Ohio pleaded guilty to raping her children after her daughter emailed an online teacher for help and said she and her siblings were being chained to their beds, deprived of food and sexually assaulted.