When Yaniret fled Honduras to escape a partner who had threatened to kill her, she didn’t imagine where her journey would end: A barren room in Texas, where she lay stripped and drugged, bloodied from self-inflicted razor wounds, with the laughter of the staff at the detention center ringing in the background. What really hurt, though, was the pain her five year-old daughter faced as she sobbed in a nearby room.

“I had no power, no control. I could not protect her,” the 29 year-old recalled in a recent interview, recounting through a translator the weeks in detention marking the start of her family’s new life in the country where she had sought protection.

There’s no way to explain to a five year-old why she deserves to be locked up, but that hasn’t prevented the Obama administration from defending its practice of detaining Central American women and children indefinitely, as mothers like Yaniret seek to claim asylum and resettle in the United States.

Last week, the government renewed its legal battle to preserve its authority to detain migrant families, arguing that preemptive incarceration is a reasonable response to an increase in border crossings from Central America.

But the lawyers who work with these families say the government has no right to preemptively imprison people on the suspicion that they will abscond from the law—they came, in fact, to seek justice, and they deserve humane treatment. “You can’t keep refugees in jail,” says Rachel Tiven, executive director of Immigrant Justice Corps, an organization that has sent volunteer lawyers to aid detained families in Texas, including at Karnes. Though the pro-bono attorneys can make a crucial difference to individual clients, there remain thousands more detainees who are deprived of legal assistance. “It is not by accident that these facilities are far even from big cities in Texas,” Tiven says of the detention centers. “These are in the middle of nowhere because the government is not interested in having people represented by quality counsel. The government’s interested in having people rapidly deported.”

In February, a federal district judge blocked Homeland Security from detaining asylum-seekers, in response to a lawsuit brought by a group of immigrant mothers who charged that the government was illegally detaining them as part of a so-called “aggressive deterrence strategy.” Another federal ruling in July ordered the immediate release of mothers detained with children, noting the government had subjected them to “deplorable” and negligent conditions.

The Department of Homeland Security has responded to the legal challenges by announcing reforms to help reduce long stays in detention. Yet the government continues to defend its broad authority to detain migrants at the border. In its latest appeal, it dropped the argument that detention of migrants served as a “deterrent” (based on the crude logic that would-be border crossers would avoid attempting to migrate upon learning how terribly asylum seekers are treated by the US government). The administration now simply insists its mass detention policy is a matter of efficient law enforcement.

Currently, more than 1,400 women and children are detained in family facilities, the vast majority in two compounds run by for-profit companies in Texas, according to Huffington Post: about 1200 at the freshly constructed South Texas Family Residential Center in Dilley, about 150 at Karnes County Residential Center, where Yaniret was held, and about 80 at a federally run facility in Pennsylvania. These centers, which have been widely criticized by rights groups, revive a practice that the Obama administration vowed to minimize back in 2009, following many complaints about inhumane, sometimes abusive conditions. But the latest round of lock-ups is justified as an emergency measure to deal with a “crisis” of parent and youth migration.

The number of “family units” apprehended at the southwest border from October 2013 through September 2014 approached 68,500, more than triple the number from the prior year. Similarly, the number of “unaccompanied children,” arriving at the border without caregivers, reached about 68,500, up from fewer than 39,000 the previous year. Though the flow has subsided in recent months, the factors driving mass migration—violence, poverty and Drug War-related crime—continue to roil across the main countries of origin, El Salvador, Guatemala, and Honduras (on top of continual arrivals from Mexico).

According to research by rights advocates, most children surveyed have credible claims to humanitarian protection. And a large majority of recent family detainees have passed initial screenings for meeting basic asylum criteria—reflecting threats of violence, persecution, or family abuse. But these migrants are massively deprived of the legal and social resources they need to navigate the courts and social welfare systems. Since asylum seekers are not guaranteed access to adequate legal representation, parents and youths often have no qualified lawyers or advocates.

An investigation by Politico of immigration court records found that “Nine out of 10 juveniles subjected to a removal order or voluntary departure had no lawyer. Seven out of 10 who did have a lawyer won decisions allowing them to stay longer in the U.S.”

Tiven underlined the contrast between the asylum system and criminal court, where there is at least a right to legal counsel: “if there is no one to stand up for you and no one to vindicate your rights in the process, of course, you end up horribly vulnerable.”

Despite purported ongoing reforms to reduce detention, detainees have continually reported brutal and dehumanizing treatment. This is often compounded by the collective trauma many have suffered en route, as many have experienced physical and sexual violence along the perilous smuggling routes.

According to formal complaints recently filed by ten migrant women, families in detention have suffered abusive treatment and inadequate medical care—for example, issuing excessive doses of Hepatitis A vaccine to children, or failing to provide needed treatment to a child who was vomiting blood. Many detainees, including mothers at Karnes, have in recent months protested and staged hunger strikes to demand immediate release. Even those who have won release have remained under draconian surveillance, subjected to high bonds or electronic monitoring ankle bracelets.

The legal crisis isn’t just a matter of poor oversight, but deliberate policy. Even while ostensibly pushing for immigration reform in Congress, the White House has focused primarily on enforcement actions, including more apprehensions at the border and aggressive arrests of undocumented workers, while presiding over more than two million deportations.

Yet the basic humanitarian concept of avoiding detention whenever possible is well established. The July ruling by District Judge Dolly Gee in fact cited a longstanding precedent from the late 1990s mandating that immigration authorities seek the least restrictive settings possible for children. Gee noted that it was “astonishing that [federal authorities] have enacted a policy requiring such expensive infrastructure without more evidence to show that it would be compliant with an Agreement that has been in effect for nearly 20 years.”

But the nation’s corporatized detention system pits profit motives against human rights. Two private companies, GEO Group and Corrections Corporation of America, dominate the detention regime and have heavily lobbied Congress to preserve its “market.” Accordingly, immigrants are milled through a “bed quota” that ensures about 34,000 detention slots in centers year-round.

Two detention beds were presumably reserved for Yaniret and her daughter. They were first detained at the border, she stated in her complaint, in facilities so notoriously cruel they had acquired folk names: first the frigid chamber known as the “ice box,” then a pen dubbed the “dog kennel,” where they were forced to sleep on the floor. After their transfer to Karnes, she said, her daughter was deprived of appropriate medical care for a vaginal infection and lost about a third of her body weight. As the detention dragged on, staffers began to verbally abuse her for trying to speak to the media about her maltreatment, “scolding me all the time.” If detainees didn’t follow orders, she was warned, “they would tell the immigration judge so they could take our kids away or mess up our case.”

As Yaniret watched her daughter’s mental condition deteriorate—“she wouldn’t smile and she would always cry”—her own despair grew so intense, she began cutting herself. That landed her in medical isolation, stripped, medicated and exposed—a new level of captivity capping her desperate pursuit of refuge.

“The people who worked at Karnes treated us as if were nothing, as if we were less than human,” she stated.

After 52 days in detention, Yaniret and her daughter were released in late June and now reside with relatives in North Carolina, awaiting a court date sometime in the distant future. Looking back, she doesn’t know if she would make the same journey over again. So she might be considered a case study of what Homeland Security calls “aggressive deterrence.”

Nonetheless, if she loses her asylum case and is deported back to Honduras, she said, her partner might threaten to kill her again. Despite the hostility she’s encountered, she finds that one form of sanctuary here: “even if he were to come to the US, I don’t think he would be able to find me, because the US is so big.”

The administration might keep trying to “deter” women like Yaniret from crossing the border, but it can’t explain why the country isn’t big enough for her and her child.