ASSOCIATED PRESS Lawyers from the Refugee and Immigrant Center for Education and Legal Services say the Trump administration is violating a legal agreement not to detain immigrant children for more than 20 days.

Children as young as 5 are being illegally detained for up to 60 days in a Texas family detention center, according to a complaint filed by immigration advocates on Wednesday.

Lawyers from the Refugee and Immigrant Center for Education and Legal Services say the Trump administration is violating the Flores settlement, a legal agreement that has been interpreted in federal court to mean that immigrant children may not be held in family detention centers for more than 20 days.

The complaint details how a group of four kids, ages 5 to 16, in the Karnes City facility are suffering “horrendous” effects such as depression, loss of appetite and physical illnesses such as chicken pox and chronic coughing.

Family detention is “a cruel and unnecessary practice that needs to end,” says Andrea Meza, the associate director of family detention services at RAICES. “There’s so much evidence that it’s bad for children.”

She says the Karnes family detention center, which is unlicensed and holds men and boys, is not fit for children. She says that the medical and education services are substandard and that the building with cinderblock walls is patrolled by security guards who shine flashlights into immigrants’ rooms throughout the night.

“It’s very much like a prison they put some paint on and hung up some cute kids’ posters in,” she says.

Danielle Bennett, an Immigration and Customs Enforcement spokesperson, told HuffPost that its three family detention centers in the U.S. include “medical care, play rooms, social workers, educational services, and access to legal counsel.”

“ICE takes very seriously the health, safety and welfare of those in our care,” she said in an email to HuffPost. “ICE is committed to ensuring the welfare of all those in the agency’s custody, including providing access to necessary and appropriate medical care.”

Meza says ICE is keeping these men and boys unnecessarily detained, since they all have family members in the U.S. they could be released to.

Last year the average detention time in children’s-only shelters ballooned to 59 days ― almost double the average stay during the final year of the Obama administration ― and the RAICES complaint states that prolonged detention is part of a “disturbing recent trend” that violates the civil rights and liberties of immigrant families.

Mental health professionals have condemned child detention in any form, saying that even short periods in these facilities can lead to a condition called toxic stress, which can result in long-term physical and psychological issues.

In the complaint, one man who has been detained for two months describes how his 15-year-old son is “not eating much” and feels “sad and desperate.” Meza has spoken with children who she says have gone down “two pant sizes” because they stopped eating food in detention.

The complaint also describes how a 5-year-old boy who was put in medical isolation because of chicken pox constantly tells his father, “Let’s go dad, let’s get out of here.”

RAICES has demanded that the Department of Homeland Security immediately release the four families in the complaint and review how its practice of detaining parents and children violates the Flores settlement.

Meza says the practice is not just cruel but also an ineffective way of deterring immigrants from crossing the border. “These extreme measures haven’t stopped people from fleeing for their lives,” she said. “So we’ve got to come up with a better solution.”