Updated at 3:45 p.m. ETThe Trump administration is proposing to lift court-imposed limits on how long it can hold children in immigration detention.Under proposed regulations set to be published in the Federal Register on Friday, the administration seeks to replace the Flores settlement, a decades-old agreement that dictates how long the government can hold migrant children, and under what conditions.The administration wants to detain migrant families together for as long as their immigration cases are pending. The proposed regulations will satisfy the "basic purpose" of Flores, the administration argues, by making sure that children are treated with "dignity, respect, and special concern for their particular vulnerability as minors.""Today, legal loopholes significantly hinder the Department's ability to appropriately detain and promptly remove family units that have no legal basis to remain in the country," said Homeland Security Kirstjen Nielsen in a statement.The proposed changes are expected to face legal challenges. Federal Judge Dolly Gee, who oversees the Flores settlement, recently rejected a separate attempt by the administration to detain children in jail-like settings for more than 20 days.Under the Flores settlement, decided in 1997 and modified in 2015, immigrant minors can't be held in jail-like settings and there are sharp limits on how long the government can detain children. The Justice Department had asked the federal court for permission "to detain alien families together throughout the pendency of criminal proceedings for improper entry or any removal or other immigration proceedings."But Gee rejected that request. "It is apparent that Defendants' Application is a cynical attempt," she wrote, "to shift responsibility to the Judiciary for over 20 years of congressional inaction and ill-considered Executive action that have led to the current stalemate."Attorneys for detained children accused the administration of trying to terminate the Flores settlement and said they will oppose that effort in court."Treating children humanely and not detaining them in often intolerable conditions is not a legal loophole, as the Secretary of Homeland Security claims," said the president of the Los Angeles-based Center for Human Rights and Constitutional Law, Peter Schey. "It is the way civilized nations treat vulnerable children with due regard to their tender age and lack of culpability for the circumstances in which they find themselves." "We will oppose in court any effort to terminate the Flores settlement unless and until the Government proposes regulations that provide for the safe and humane treatment of detained children and that are fully consistent with the terms of the settlement we negotiated in 1997," he added.Other immigrant advocates said the government appears to be trying to end court oversight of children's detention facilities."This is an administration that has not complied with the settlement agreement as it is," Michelle Brane, the director of Migrant Rights and Justice at the Women's Refugee Commission, told NPR."So to have them now say we don't need any more court oversight and we will oversee ourselves is frankly appalling," said Brane.The administration's plan also drew a swift rebuke from Democratic Minority leader Rep. Nancy Pelosi."This is another inhuman assault on families and children," she said at her weekly press conference. "It's a wrong decision that he made ... I completely disagree with what the president has done.""When you see the visual of them taking babies away from their moms, and then saying 'we can keep them endlessly,'" she continued, "you understand the inhumanity of it all. It has no practical value."The move comes just months after the Trump administration attempted to discourage illegal immigration by separating migrant families at the border, but then backed down because of the resulting uproar. As of last week, nearly 500 children were still in government-run shelters without their parents. Copyright 2018 NPR. To see more, visit http://www.npr.org/.