Senate Bill 1018, which would lower state standards for two South Texas immigrant detention centers so they can qualify as Texas-approved "family residential centers," passed its first hurdle in the Texas Senate on Tuesday with a 20-11 vote along party lines. Immigrant rights advocates opposed to it say it's just the state's latest attempt to help keep the family lockups open as federal court orders threaten to shutter them. Democratic lawmakers fighting the bill say it would license "baby jails."

"The very idea of holding children in a baby jail is unconscionable in my book," said Sen. Sylvia Garcia, a Houston Democrat, before the bill passed its first reading in the Senate Tuesday. "They’re not leaving their country to come here for fun."

So-called "family detention" resurfaced in Texas in the summer of 2014 as federal immigration officials under the Obama Administration struggled to handle what they called "an unprecedented influx in illegal migration from Central America" — or, put another way, an uptick in asylum seekers fleeing raging violence in their home countries. In past years, such migrants would have been handed a summons and released to fight their case in immigration court at another date. But thanks to the steady rise of immigration enforcement and detention under the "deporter-in-chief," those women and children were now labeled a national security threat and thus could be detained, often with an extremely high bond — or, in some cases, no bond at all.

That's when the Corrections Corporation of America (which has since changed its name to the more innocuous-sounding CoreCivic) and the GEO Group, private prison corporations that have grown fat off the push for greater immigration enforcement and detention, started housing asylum-seeking women and children at minimum-security lockups in the desolate South Texas towns of Dilley and Karnes.

The feds' last foray into family detention was at the infamous T. Don Hutto detention center in central Texas that was run by CCA. There, immigration lawyers and human rights activists complained of children dressed in prison-like jumpsuits and kept in small cells for 14 hours a day. A legal challenge by the ACLU ultimately forced the feds to pull children out of Hutto in 2009, citing a longstanding legal settlement that was supposed to bar the feds from ever again holding immigrant kids in a prison-like environment.

Which is why lawyers challenged the practice of holding kids at Dilley and Karnes, sometimes for months. A year after they opened, a federal judge in California delivered a pair of court rulings that unambiguously condemned the practice of child detention, writing that the government hadn't provided "any competent evidence" to support its argument for jailing asylum-seeking families as a default measure. As part of her ruling, the judge said the feds couldn’t hold kids in facilities that aren’t licensed to house or care for children.

Advocacy groups like Austin-based Grassroots Leadership, which has criticized the conditions immigrants are housed in at Dilley and Karnes, thought the courts were on the verge of forcing an end to family detention. After all, when dealing with complaints over facilities like Hutto, the Texas Department of Family Protective Services had previously insisted it had no oversight role over private prison-run immigrant detention centers that house children in Texas and couldn't license them or hold them to a higher standard.

Then DFPS changed its mind. Weeks after that federal court ruling threatened the future of those detention centers, Texas officials came in with the assist, attempting to fast-track a special license for the child lockups that would have exempted the private prison contractors from certain basic requirements — like caps on the amount of kids you can house in one room, rules to keep unrelated boys and girls from being housed together, and a prohibition against housing kids with unrelated adults.

Grassroots had to sue to force Texas child welfare officials to even hold a public hearing on the matter, which did not go particularly well for the agency. Child welfare experts, immigrant rights advocates, former immigrant detainees and even a woman born behind barbed wire in a Japanese internment camp condemned the practice of family detention and insisted state licensing would only enable a practice that's destructive to healthy child development. Mothers spoke of being separated from their children for extended periods of time and inadequate medical care. Mental health experts who'd visited the facilities spoke of children losing weight, shedding hair and exhibiting symptoms of anxiety and depression in lockup. Social workers claimed they'd been reprimanded by private prison staff for trying to help suffering mothers or children navigate the facility's grievance process.

So lobbyists with the GEO Group, which operates the Karnes detention center, decided to try another route. As the Associated Press reported last month, the company helped draft the proposal now snaking through the Texas Legislature that would give DFPS the authority to license the detention centers. Its supporters argue it's a way to ensure families aren't separated in detention; Democrats arguing against the measure in the Senate Tuesday called it a "vendor bill."

If the bill passes a third reading in the Senate, it moves on to the state House. Still, it's unclear whether lawmakers will have enough time to send the measure to Gov. Greg Abbott's desk before the fast-approaching end of the session on May 29.

But to Grassroots executive director Bob Libal, whose group sued the state over the licensing issue, the episode constitutes just another state attempt to help private prison corporations keep alive the controversial practice of family detention.

"The push to license the family jails has never been about protecting children, but about protecting the profits of private prison companies," Libal said in a prepared statement last month. "The state should stand up to these interests and for the rights of children and reject these unjust bills."