A bill written by a private prison operator to assist its immigration detention business could advance through the Texas state Senate this week, despite vocal protest from civil rights groups. The legislation would allow family detention centers to be classified as childcare facilities, enabling Immigrations and Customs Enforcement to detain women and children for longer periods.

The bill aligns with the Trump administration’s punitive immigration policies and helps it navigate a challenge to federal detention policy.

During the migrant influx of 2014, the Obama administration contracted the construction of two giant family detention centers in south Texas — one for each of America’s biggest private prison companies — to hold women and children seeking asylum. CoreCivic runs the South Texas Family Residential Center in Dilley, and the Geo Group manages the Karnes County Residential Center.

However, because of multiple judicial rulings dating back to 1997, no undocumented child can be held for over 20 days in anything but a licensed “non-secure” childcare facility.

Almost nothing about these detention centers meets that definition. Grassroots groups have given them the grim nickname “baby jails,” and a survivor of a WWII-era Japanese internment camp said the facilities “triggered distressing associations of my own experience as a child.” Reports of inadequate medical care, sexual abuse, improper solitary confinement, and permanently stunted child development proliferate. Most of all, the presence of locks on the doors contradicts the idea of a non-secure facility. “They’re not allowed to leave. That’s jail,” said Mary Small of the Detention Watch Network, a national coalition working on immigration issues.

The Texas Department of Family Protective Services granted the facilities childcare licenses, but last year a state judge blocked the designation. So Geo Group, the nation’s second-largest private prison operator, went to work assembling legislation that would countermand the judicial ruling. The bill would lower state childcare standards for family detention centers, excluding the facilities from regulations such as ones that prohibit housing children and unrelated adults in the same room.

Republican State Rep. John Raney admitted to the Associated Press that Geo Group officials wrote the legislation. “I’ve known the lady who’s their lobbyist for a long time. … That’s where the legislation came from,” said Raney. “We don’t make things up. People bring things to us and ask us to help.” There’s companion legislation in the state House and Senate.