The largest immigration detention center in the United States has a gym with Zumba classes, a beauty salon, playgrounds, and a school for kids. It also has barracks-style housing and the tall chainlink fencing of a prison.

The U.S. has three family detention centers, used to hold migrant children and their mothers as they apply for asylum, and the two largest are in Texas. One is in Dilley, the other in Karnes. They’re both dusty towns between San Antonio and the Mexican border, and together they have about 3,500 beds.

The facilities have been at the center of a legal fight in Texas courts this week. The issue is whether one of these centers could or should be considered a child-care facility. The Obama administration has tried to get Texas to grant its Karnes County Residential Center a child-care license, arguing that the designation would serve in the best interest of immigrant children, who are held there as they’re screened for asylum. But immigration advocates hope to shut down the centers, which they view as prisons––or at the very least, they want the children released. This strange-sounding struggle over a label is about legal semantics, but it’s also about how the U.S. chooses and is allowed to treat migrant children.  

In 2014, an unprecedented surge of migrant families from Central America crossed the U.S.-Mexico border. Although detention centers had been used long before this, that year the Obama administration made them key to its immigration policy. Dilley was built that year, and Karnes was greatly expanded. Immigration advocates fought back, and last year in the Federal District Court for the Central District of California, Judge Dolly Gee made a ruling that helped their case. In her decision last July, the judge said the centers were in “deplorable” condition, and that they failed to meet even minimal standards. Gee pointed to a 1997 ruling that determined the government cannot treat a child in detention as it would an adult. She ordered the Obama administration to release the migrant kids from both Texas centers.

That didn’t happen. The Obama administration appealed, and for the past year has tried to figure out how to get around the ruling. In December, Texas held a public hearing about whether it could issue detention centers a childcare license. At the meeting, Paul Morris, who’s in charge of issuing the licenses on behalf of the Texas Department of Family and Protective Services, told the crowd, “My staff would make periodic inspections of the facilities. They would investigate any allegations of abuse and neglect and any other alleged violations of minimum standards.”

That’s largely how the government has framed the need for the license. Immigration and Customs Enforcement—the federal agency that oversees the private company that runs Karnes facility—has said it’s an “important step forward in ICE’s commitment to enhancing oversight and transparency.”

But an Austin-based immigration attorney at the meeting, Virginia Raymond, called the idea “an insult to the common sense of the people of Texas.”

The Karnes center’s inspection report, filed in March of this year and obtained by The Texas Observer, showed six “deficiencies” in operations, including an unattended child, an unqualified employee, and no record-keeping of children’s allergies. But Texas said it met childcare standards anyway.

Then last week, the administration got a win when Texas issued the Karnes center the license. This week, Grassroots Leadership, a nonprofit that advocates against private ownership and operation of prison and detention centers, sued the state. A day later, a judge in Austin blocked the child-care license, putting it on hold until advocates and the government could sort it out in a hearing on May 13.

“By all reasonable measures, family detention camps are prisons,” said Bob Libal,  the executive director of Grassroots Leadership. Another nonprofit’s executive director likened the idea of calling them childcare facilities to putting lipstick on a pig.

Part of the problem advocates take with the detention center looking after children has been one of image, and Obama has recently tried to clean that image up, especially after senators and members of Congress visited last June––some of whom later demanded they be shut down. It was that summer one former Karnes employee said security locked up migrant mothers who spoke out about the conditions. She said a psychologist worked as an informant for federal agents, and that her bosses regularly asked her to omit complaints to hide them from government audits. In early 2015 and again in December 2015, migrants at the center went on hunger strikes.

Carlos Holguin, of the Center for Human Rights and Constitutional Law, wrote this last year about his trip to the Karnes center:

We passed through one door, it closed behind us; we were then directed to display our visitor’s badges to a guard behind heavy glass; the second door was opened, we walked through, and we then reached the interior of the facility. The Karnes facility is constructed of concrete block. A staff member stated the facility had been designed to house adult male prisoners. . . . In the central open area I saw neither a direct view nor access to the outside: it was effectively surrounded by the high block walks of the facility itself, denying those inside any means of ingress or egress except via the secure entrance I earlier described. Facility staff stated that children detained at Karnes have never been permitted outside the facility to go to the park, library, museum, or other public places. Children attend school exclusively within the walls of the facility itself. Detainees, including children, are required to participate in a “census” or headcount three times daily.

The average stay in a similar detention center in Dilley, Texas, was 22 days in 2015––though some have been kept a year. There, more than half of the migrants are children. Their average age is nine.

ICE does have an alternative to detention that allows migrants to live in communities with relatives. The program often involves regular check-ins with immigration agents and sometimes an ankle monitor. It’s less expensive for the government ($17 a day, compared with the $159 that detention costs each day) and is very effective making sure migrants come to their court dates. But, the administration would argue, nothing is more effective for ensuring a person shows up to court than holding someone inside cement walls.

According to the latest numbers from Customs and Border Patrol, for the first six months of fiscal year 2016, which ended in March, agents caught almost 28,000 unaccompanied children trying to cross the border. That is a 78 percent increase from 2015. The number is nearly equal to the immigration surge of 2014, which Obama called an “urgent humanitarian situation.”

This summer, when immigration picks up as it does every year in the warmer months, the migrant children and their families who cross the border will need to be processed. And because the U.S. has increasingly dealt with this by holding them in detention centers, they will need somewhere to stay. Many will end up in Texas detention centers, in squat barracks with a gym and a playground, ringed with chainlink or cement walls. At least one of those facilities may be a licensed child-care center.